My example is slightly a little different from the ones I have been seeing in the threads.
I want to be able to convert YYYY-MM (ie. 2021-OCT) to YYYY-MM-DD (ie. 2021-10-01). Is there a way to do that? I found a long way of doing it using formula but wanted to see if there's a simple and short way?
Thank you!
Solved! Go to Solution.
Use this in a formula tool and it should give you what you need.
DateTimeParse([date]+"-01","%y-%b-%d")
I am assuming that your Date field is of the String data type. I used the DateTime tool in the Parse tab to accomplish this.
(1) - Select String to Date/Time Format
(2) - Select the field containing the string you want to convert to the desired date format.
(3) - Specify a name for the new date column.
(4) - Select "Custom" in the format matching the incoming string field and specify the format of the incoming field as yyyy-MMM.
Hope this helps.
omg! these are all great solutions! Thank you all sooo much!
@RyanMaxwell It's a string but some how it is null once I convert it to the same format as yours.
@blitz45 Can you provide your input data?
@binuacs yours worked as well. I meant RyanMaxwell's option.
here's a screenshot incase you wanted to check it out.