Page 1 of 1

Remove time hour zero when using %r time

Posted: November 5th, 2020, 10:51 pm
by JohnBurns
Is there a way to remove the "0" in the hour when using %r time in a skin? I know %#I or %#H works but what do i do with %r? %#r does not seem to work. What's the trick? Appreciate any help. Thanks.

Re: Remove time hour zero when using %r time

Posted: November 5th, 2020, 11:15 pm
by jsmorley

Code: Select all

[MeasureTime]
Measure=Time
Format=%r
RegExpSubstitute=1
Substitute="^0":""
^ Just means "beginning of the string" in Regular Expression.

Having said that, I'm not sure I see any advantage to %r over %#I:%M:%S %p to be honest.

Re: Remove time hour zero when using %r time

Posted: November 5th, 2020, 11:19 pm
by JohnBurns
Thanks for the fast reply - appreciate your help and all your work in Rainmeter.