Alteryx Designer Desktop Discussions

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

Excel numeric to Alteryx date

DanielCarro
8 - Asteroid

Hi,

 

I have an issue which I need to resolve. I have excel numeric date and dates in a column

 

11/07/2022

11/07/2022

11/07/2022

20/08/2022

44753

44739

44739

44746

I viewed on the forum some feeds and I tried the DateTimeAdd but it hasn't worked

 

Much appreciated any advice

 

Regards

Dan

3 REPLIES 3
binuacs
20 - Arcturus

@DanielCarro One way of doing this. The dd/mm/yyyy formatted can be converted into alteryx datetime format using the DateTimeParse() function and the numeric part can be converted using the toDate() function.

 

binuacs_0-1660112671222.png

 

grazitti_sapna
17 - Castor

@DanielCarro, another way of doing this. Assuming there are many ways of entering the date. Everytime you have a different date format you can match the regex first then parse the date in alteryx date format.


if REGEX_Match([Date],"\d+") then ToDate(tonumber([Date]))
elseif REGEX_Match([Date],"\d+/\d+/\d+") then DateTimeParse([Date],"%d/%m/%Y")
else [Date] endif

grazitti_sapna_0-1660113014888.png
I hope this helps!

 

Thanks!

Sapna Gupta
DanielCarro
8 - Asteroid

Hi

 

@binuacs it worked perfectly, thank you very much

Labels