Alteryx Designer Desktop Discussions

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

Convert string to Date Jan-50 to see it as 1950-01-01

Marta12
7 - Meteor

Hi, 

I try to use DateTime tool but when I use "Mon-yy" it reading Jan-50 as 2050-01-01 and I'm expecting 1950. This issue disappear reaching date  Jan-55 --> 1955-01-01. Do you know how to repair it? 

 

Marta12_0-1614171081538.png

 

3 REPLIES 3
mot
11 - Bolide

Hi @Marta12,

 

I would suggest to add "19" to the string first before converting:

Screen Shot 2021-02-24 at 8.53.17 AM.png

This way, you can ensure that the dates are in 1900s. See the workflow attached. You can then convert using datetime. I hope this helps. Best!

Marta12
7 - Meteor

Thanks, but my data also contain more recent data till 2021. This formula won't work with more recent date. 

mot
11 - Bolide

Hi @Marta12,

 

In that case, you can add an if statement to determine if Jan-10 is in 20xx or 19xx. I have added this logic to the workflow. I hope this helps. Best.

Labels