Hi All,
I really need some advice! Have been trying to figure this out for ages...
I have a column (yyyy-mm-dd hh:mm:ss) however, the hour field is a single-digit if the hour is below 10.
For example, "2015-11-30 3:17:04"
How do I use regex to make it into "2015-11-30 03:17:04"
Any advice appreciated!
Thanks,
Viv
Solved! Go to Solution.
Hi @viv_acious
I have attached an example workflow which does the following:
(.*) = Group everything up to a space - 1st marked group
\s = space in between date and time
(\d{1}\:)$ = Group everything which has 1 digit before a : - 2nd marked group (This means all those with two digits do not get a zero)
(.*) = Picks up everything else in the string
Replace text adds back in the first marked group with a space, then adds a zero and then second marked group
Best,
Jordan Barker
Solutions Consultant
You could also use the DateTime tool:
Hope it helps!
User | Count |
---|---|
19 | |
14 | |
13 | |
9 | |
8 |