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

Converting to date

Hamder83
11 - Bolide

Hi 


I prob. need a regex, but im not sure how.

I have several files til date convertion error.

Dates like:
1/31/2020
1/7/2020

And when i convert mm-dd-yyyy i misses those that needs the 0 before the date.

How to worj around this?

 

2 REPLIES 2
DavidP
17 - Castor
17 - Castor

You can use a datetimeparse fuction like this

 

DavidP_0-1581582744827.png

 

DavidP
17 - Castor
17 - Castor

Interestingly, this scenario was the topic of weekly challenge 34

 

https://community.alteryx.com/t5/Weekly-Challenge/Challenge-34-Date-Time-Formatting/td-p/36437

 

But the datetimeparse function in the formula tool can handle singe digit months or days.

Labels
Top Solution Authors