Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

Date with month format conversion issue

hegdepavithra10
9 - Comet

Hi,

 

I have date in excel xls file, when imported to Alteryx is of V_Wstring format. The date is in the format '28-Oct-20'. I am trying to convert it into '2020-10-28' using DateTimeParse([Date],"%Y-%m-%d") . All the values have turned into null.

 

Can someone please help.

4 REPLIES 4
atcodedog05
22 - Nova
22 - Nova

Hi @hegdepavithra10 

 

Try

DateTimeParse([Date],"%d-%b-%y")

 

Here is a workflow:

Output:

atcodedog05_0-1603731241819.png

Workflow:

atcodedog05_1-1603731254990.png

 

Hope this helps 🙂


If this post helps you please mark it as solution. And give a like if you dont mind 😀👍

hegdepavithra10
9 - Comet

@atcodedog05  Thank you . This definitely helped. But if you do not mind could you explain the logic

atcodedog05
22 - Nova
22 - Nova

Sure @hegdepavithra10 

 

Basically in DateTimeParse() function you need to give the format in which your input text is in.

 

Here its 28-Oct-20 and pattern for it is %d-%b-%y. 

 

%d- date

%b-  month in text like Oct. If it was in number like 10 it would be %m

%y- year

 

so pattern %d-%b-%y

 

Hope this helps 🙂

atcodedog05
22 - Nova
22 - Nova

Happy to help 🙂 @hegdepavithra10 

 

Cheers and Happy Analyzing 😀

Labels