[GUIDE] Parsing Time - Splitting HH:MM:SS into H1 H2 M1 M2 S1 S2

Here is a quick guide on how to parse time into separate digits (WFS v1.2.6)
(If you have a better way, please do share)

First digit of hour (24H and 12H format) 23:45 → 2 / 12:45 → 1
([IS_24H]?(floor([HOUR_0_23]/10)):(floor([HOUR_1_12]/10)))

Second digit of hour (24H and 12H format) 23:45 → 3 / 12:45 → 2
([IS_24H]?([HOUR_0_23]%10):([HOUR_1_12]%10))

First digit of minute 23:45 → 4
(floor([MIN]/10))

Second digit of minute 23:455
([MIN]%10)

First digit of second 23:45:19 → 1
(floor([SEC]/10))

Second digit of second 23:45:199
([SEC]%10)

Parsing Time Example

5 Likes