I'm wondering what the easiest solution would be to parse out the date below to result in YYYY-MM-DD
Apr 23, 2019, 3:29 PM
The output I would like would be 2019-04-23
Thanks!!
Ian
Solved! Go to Solution.
So I figured out a work around:
1. used the formula tool to parse out:
Month: Left([Transaction Date], 3) -- Result Apr
Day: Substring([Transaction Date],4,2) --- Result 24
Year: Substring([Transaction Date],8,4) --- Result 2019
2. Created a crosswalk in excel for the month:
Jan - 01
Feb - 02
Mar - 03
Apr - 04
3. Joined the Month string (Apr) to the crosswalk to return the number value for the month, Apr = 04
4. Concatenated all the fields back into one
[Year]+'-'+[Month]+'-'+[Day]
I don't know if that was the easiest solution but it got the job done.
You could also use the datetime tool. I hope this helps!
You can parse that using this expression in a Formula tool:
DateTimeParse([Input],"%b %d, %Y")
Where "Apr 23, 2019, 3:29 PM" is in the {Input] field.
Oh lord, I feel pretty stupid.