Alteryx Designer Desktop Discussions

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

Different String Date Formats in same Column

bburzanko3
5 - Atom

I am looking to clean up a field that is currently in a string format and need to make it a date format. The problem is that the formats in the string field are different.

 

Ex:

2/21/2021 -> 02/21/2021

4/8/2021 -> 04/08/2021

05/15/2021 -> 05/15/2021

2021/06/25 -> 06/25/2021

 

I need to get them into a mm/dd/yyyy format and when it starts off with the year I am having trouble with that.

 

Date Format Issue.PNG

5 REPLIES 5
DataNath
17 - Castor

@bburzanko3 do they appear as all 3 combinations (dd/mm/yyyy, mm/dd/yyyy & yyyy/mm/dd), or is it just a mixture of mm/dd/yyyy & yyyy/mm/dd?

bburzanko3
5 - Atom

They are all either MM/dd/yyyy or yyyy/MM/dd.

DataNath
17 - Castor

Do you need the exact data type or is this alright? Workbook attached with 2 different methods.

 

DataNath_0-1652407310453.png

 

DataNath_0-1652409362276.png

 

 

binuacs
20 - Arcturus

@bburzanko3 another way of doing this with Regex_Match function

binuacs_0-1652420161483.png

 

bburzanko3
5 - Atom

Both of these worked perfectly, thank you!

Labels