Hello,
Can anyone help me with a tool to convert the standard date format (yyyy-mm-dd) to the specified format (mm/dd/yyyy)
Thanks.
Solved! Go to Solution.
Ahoy,
You can do this in a Formula Tool, you are trying to change the format of a date into a string, so you need the
DateTimeFormat function, this takes two parameters, the field you are changing, this must have the data type of Date and the format you want to change it to , what you need is this
DateTimeFormat([Existing Date], '%m/%d/%Y')
FOr a full breakdown of the DateTime Function you can check the help documents here https://help.alteryx.com/current/en/designer/functions/datetime-functions.html#:~:text=Alteryx%20use....
To add to this, if you want to overwrite the same field with the new format you will need to change the datatype (as it is probably date or datetime now)
This cannot be done with a formula tool, because when you transform a field with this tool, it cannot change datatype at the same time.
The transformation and change of data type can be done in one multi-field tool.
Use the expression as @Carlithian gave and change the data type to a string format.
It can indeed be done in that tool, but I hate it and will never recommend it 😂
@Carlithian completely agree and I would always do it the formula tool way, but always good to show other methods (preaching to the choir here)
Thank you, folks :) I could get the desired format now.