Join the Alteryx Community’s Maveryx Summer Cup event! Compete, network with others, and earn your gold through a series of challenges from July 24th to August 11th. Learn more about the event here.

Alteryx Designer Desktop Discussions

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

Convert multiple Date formats from String to Date data type

Adarsh_R3
8 - Asteroid

Hi all,

 

I have a field that contains dates but the data type is in string format. The issue is that this field is not uniform since it contains multiple date formats. 

 

For example:

 

Date Field

 

13-05-2021
21 March 2020
18012020
20200726

 

 

Is there any way to process this field and convert it all to yyyy-MM-dd, please note that the field contains multiple formats I've just given a sample of how the values look like in this field. 

 

Thanks a lot for your time.

3 REPLIES 3
atcodedog05
22 - Nova
22 - Nova

Hi @Adarsh_R3 

 

You would need to check for each dateformat and parse them accordingly if there are any new formats you would need to add them.

 

Workflow:

atcodedog05_0-1635700813195.png

 

Hope this helps : )

 

Adarsh_R3
8 - Asteroid

@atcodedog05 

Thanks a lot for the quick reply.

 

If you don't mind, since I'm not that fluent in RegEx could you please direct me to a source or to a website that contains a lot of info regarding RegEx? 

atcodedog05
22 - Nova
22 - Nova

Hi @Adarsh_R3 

 

This page might be helpful to you.

https://community.alteryx.com/t5/Alteryx-Designer-Knowledge-Base/Tool-Mastery-RegEx/ta-p/37689

 

Hope this helps : )

Labels