Free Trial

Alteryx Designer Desktop Discussions

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

Converting odd looking dates to a standard format

Deano478
12 - Quasar

Hi Community,

 

This is a bit of an odd one I was sent over a file yesterday evening from a colleague and one of the fields called EntryDate contained "Dates" in a string format however they are in a very weird looking format as seen below for example 1/13/2023 there cant be 13 months in a year. 

 

Would anyone be able to help me convert these weird dates to the standard Altyerx format?

 

Any and all help is much appreciated as always.

 

Here a sample of the dates:

 

EntryDate
01/12/2023
1/13/2023 0:00
01/11/2023
01/12/2023
1/13/2023 0:00
1/16/2023 0:00
01/09/2023
01/10/2023
01/11/2023
01/12/2023
1/13/2023 0:00
01/12/2023
01/10/2023
01/11/2023
01/12/2023
1/13/2023 0:00
01/10/2023
01/12/2023
01/12/2023
01/11/2023
1/13/2023 0:00

 

 

8 REPLIES 8
binuacs
21 - Polaris

@Deano478 you can use the DateTimeParse() function to change date format

 

binuacs_0-1679391279908.png

 

ShankerV
17 - Castor

Hi @Deano478 

 

One way of doing this.

 

ShankerV_0-1679391391572.png

datetimeparse([EntryDate],"%m/%d/%y")

ShankerV_1-1679391409436.png

 

Many thanks

Shanker V

 

Deano478
12 - Quasar

@ShankerV  and @binuacs Much appreciated guys those weird dates are fixed for that sample but when I run it on the full dataset i get a lot of conversion errors should i attach the file itself so you guys can see it?

Deano478
12 - Quasar

Here is the actual file just with all the dates

binuacs
21 - Polaris

@Deano478 @Use the formula DateTimeparse([Date],’%m/%d/%y’)

Deano478
12 - Quasar

hey @binuacs I used it again on the full data set but my Results windows says this:

 

Deano478_0-1679393439439.png

 

binuacs
21 - Polaris

@Deano478 Just noticed that you have both formats YYYY-MM-DD and DD/MM/YYY. I updated the formula accordingly

binuacs_0-1679393571941.png

 

Deano478
12 - Quasar

@binuacs Many thanks it worked perfectly i should have probably mentioned that in my question but thank you nonetheless 

Labels
Top Solution Authors