Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.

The highly anticipated Alteryx Community tradition is back! We hope you'll join us!

Learn More
We will be upgrading the Gallery to our 2019.4 release this Saturday, December 7th beginning at 9:00am MT. We expect the outage to take last approx. 2.5 hours.

Convert String to DateTime


Hi , 


I would like to convert String to Date Time .For an example ,



Input      10/6/17 12:00 PM (String type)

Output  10/6/17 12:00 PM(DateTime Type)


I try using the Datetime tool but the outcome :2017-01-06 12:00:00


It is almost correct but the AM/PM is not appearing.


Thank You.

You will need to use a formula tool to cope with the AM/PM I think.


An expression:

DatetimeParse([StringDate],"%m/%d/%Y %I:%M %p")

should work


The output DateTime format will be in YYYY-MM-DD HH:mm:ss format as that is how Alteryx stores dates


Sample attached

The key part here is the parameter characters are case sensitive. Y for year , m for month and d for day which I ignored and struggled for sometime.