Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Parse out date values using RegEx

ScottC1971
7 - Meteor

Afternoon all,

 

I am fairly new to Alteryx and trying to deal with some dates that are variable in their formatting.  The dates generally occur like this:

 

1-2 digit month, 1-2 digit day, and a 4 digit year.  I am trying to parse out the month, day and year into seperate fields and then recombine them so that they appear in this format:

 

2 digit month - 2 digit day - 4 digit year.

 

Then I plan on putting the column through the date time parse tool by converting a string to a date time value.

 

I have been trying a series of left, right and substring functions to solve this problem but nothing seems to work 100% consistent.  Regex is a bit abstract for me at this point so this switch to understand this concept in my head has not really "clicked". 

 

Any help would be much appreciated.

 

Thank you,

 

Scott

3 REPLIES 3
messi007
15 - Aurora
15 - Aurora

@ScottC1971,

 

Maybe I didn't indertand well what you need. But with date format you can do the job :

 

messi007_0-1655748509427.png

 

Hope this helps!

Regards,

binuacs
21 - Polaris

@ScottC1971 Another way of doing this with the DateTimeParse function

 

binuacs_0-1655762087881.png

 

Qiu
21 - Polaris
21 - Polaris

@ScottC1971 
Can you give us a sample input?

The worse case would be that there is no delimiter between the digits.

For example, 1222022, dont know it is 2nd Dec, or 22, Jan.

Labels
Top Solution Authors