Hi,
I have a text file have "date/time am pm" and want to convert into date/time format.
The text data is m/dd/yyyy h:mm:ss am/pm as below
1/12/2019 7:46:04 PM
I used "DateTime" workflow with "String to Date/Time format"
--> It returned as 1/12/2019 7:46:04 .This is 7 am not 7 pm.
Can you please help with this?
Solved! Go to Solution.
Hi @kcho ,
You can use the datetimeparse function as example attached. The specifiers to use in the functions are shown here. https://help.alteryx.com/2020.1/Reference/Functions.htm
DateTimeParse([Field1],'%m/%d/%y %I:%M:%S %p')
Best,
Fernando Vizcaino
Thank you very much! 🙂
Fernando:
Thanks for your solution to this common problem, but the challenge is really for Alteryx's developers to rise to the occasion! Come on, AltDevs; it's a date/time with am pm format--every human being knows what it means. Even children know. Users are too busy solving to be bothered with the kindergarten of data which includes date & time handling, adding or eliminating leading zeros in all sorts of numbers, and converting between number & string. These are absurdities we shouldn't have to deal with anymore in our daily work. Once these are all automated the way they need to be, we'll play a game of "thank the dev!"
removed
User | Count |
---|---|
19 | |
15 | |
13 | |
9 | |
8 |