Hi,
Via a WebParser Measure I get a TimeStamp like this:
2020-08-05T15:33:33.014-0400
which I want to format so that I can discard the milliseconds BUT not the TimeZone.
So far:
TimeStampFormat=%Y-%m-%dT%H:%M:%S.
But I do not know how to "discard" the milliseconds and "get" the Timezone.
Any suggestions?
It is currently April 20th, 2024, 4:25 pm
TimeStamp With Milliseconds & TimeZone
-
- Posts: 6
- Joined: August 5th, 2020, 7:28 pm
-
- Rainmeter Sage
- Posts: 16150
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: TimeStamp With Milliseconds & TimeZone
Add a RegExpSubstitute=1 option to the WebParser measure returning the above time stamp, along with the following Substitute option: Substitute="(.*)T(.*)\.(.*)([-|\+].*)":"\1T\2\4".
-
- Posts: 6
- Joined: August 5th, 2020, 7:28 pm
Re: TimeStamp With Milliseconds & TimeZone
balala,
Fantastic!
Thanks
Fantastic!
Thanks
-
- Rainmeter Sage
- Posts: 16150
- Joined: October 11th, 2010, 6:27 pm
- Location: Gheorgheni, Romania
Re: TimeStamp With Milliseconds & TimeZone
Glad to help.
Properly using regular expressions is not simple, but can help in many cases.
Properly using regular expressions is not simple, but can help in many cases.