Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Date formatting while importing CSV file

aetingu
7 - Meteor

Dear all,

 

I am importing multiple csv files in to Alteryx.  The issue I have is with the dates coming in.  They are strings formatted as day month and year with no leading zeros.  i.e 1/9/2020 for September 1st.  How do I convert this to datatime alteryx can use.  I ave used the DateTime parser, but can't match the input.

 

Any help is more than appreciated.

Regards,

Aksel

 

3 REPLIES 3
PhilipMannering
16 - Nebula
16 - Nebula

Hi @aetingu 

 

If you're using a formula tool, you can use

DateTimeParse([My Date Field], '%m/%d/%Y')

 

This should work. Let me know if not.

 

thanks,

Philip 

aetingu
7 - Meteor

Thank you @PhilipMannering , Don't understand why I keep over thinking!:)

PhilipMannering
16 - Nebula
16 - Nebula

We all do it. When you get started it's very confusing that month is %m in the formula tool but capital "M" in the DateParse Tool. Anyway, glad it's working.

Labels