Hi, So many different date formats & functions to get used to :)
Anyone can help me convert the folloiwng string to a date 9/28/2016? thanks
2016-09-28 09:53:04
Solved! Go to Solution.
First - bookmark this page:
https://help.alteryx.com/10.6/index.htm#Reference/DateTimeFunctions.htm
Better yet, print it out- specifically the table under the 'Date/Time Specifiers' section - I keep a copy pinned to my office wall next to my monitor.
For your example in a formula tool you would set a new date field and use the following to convert your string to an actual date value
datetimeparse([yourStringField],'%Y-%m-%d %H:%M:%S')
This will preserve the full timestamp should you need that. If then you only care about keeping it at the day level, you can wrap it in a DateTimeTrim(<date/time>, 'day')