Hi I would like to ask if how can I easily transform or convert the date field which combines both "date and string" type of data.
Date: Expected Output:
02 05 2020 2020-02-05
03 12 2020 2020-03-12
2020-01-27 2020-01-27
2020-07-14 2020-07-14
04/14/2020 2020-04-14
02/12/2020 2020-12-02
Can you help me with this one pls?
Here is how you can do it.
Formula :
IF Contains([Date], " ")
THEN DateTimeParse([Date],"%m %d %Y")
ELSEIF Contains([Date], "/")
Then DateTimeParse([Date],"%m/%d/%Y")
ELSE DateTimeParse([Date],"%Y-%m-%d") ENDIF
Workflow:
Hope this helps : )
Hey @dunkindonut7777
It looks like @atcodedog05 has you covered, but I wanted to share a great macro that is available on the Alteryx Gallery that can convert varying date types listed in the same field.
The only prep needed from your example is to replace the space with a forward slash.
Here is the link to download the macro: https://gallery.alteryx.com/#!app/BB-Date/577fe8aba248970840e6dd4d
Cheers!
Phil
This is amazing @Maskell_Rascal. Thanks for sharing 🙂👍