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

Using reg to fix date

nwatzlaf
8 - Asteroid

Hi there,

 

I have a date (in string format) that reads 20151007. I would like it to read 2015-10-07. I think this is a use case for reg ex but I am not sure.

 

Any pointers would be greatly appreciated.

 

Thank you for your time,

Natalia

2 REPLIES 2
DataNath
17 - Castor
17 - Castor

Hey @nwatzlaf, there's a whole load of ways to do this - here's one approach where you just tell Alteryx the format of the incoming date in its string form and it creates an ISO date (YYYY-MM-DD) from that:

 

DataNath_0-1675954621565.png

 

%Y denotes a 4-digit year

%m represents month

%d represents day

 

Hope this helps!

nwatzlaf
8 - Asteroid

Hi @DataNath ,

 

Super helpful! Thanks so much!!

 

- Natalia

Labels
Top Solution Authors