I'm new to the Alteryx. I'm trying to convert the datetime string to datetime format for the data below.
I'm using this function "datetimeparse([DeliveryDate],'%y-%m-%d %X')" and i'm getting the below error -
Formula (6) DATETIMEPARSE: Cannot convert "2016-11-01 15:37:20" to a date/time with format "%y-%m-%d %X": Hour is out of range 1..12: '15:37:20'
Please let us me know the right way.
Yes, we can do that but we wanted to do it through the formula.
We were able to convert it to date using :datetimeparse([DeliveryDate],'%Y-%m-%d %H:%M:%S'). Most of the values are converted but for some of them it's throwing an error as below
Formula (6) DATETIMEPARSE: Cannot convert "DeliveryDate" to a date/time with format "%Y-%m-%d %H:%M:%S": Expected a number for year: 'DeliveryDate'
Why do not you use a DateTime tool?
I have around three date fields so i need to use the datetime tool for each field?
The problem in the initial formula is that %X is the time in 12hr notation with AM/PM, you have the time in 24hr notation.
In order to parse the time that you have, you should be able to use: