Alteryx Designer Desktop Discussions

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

Date formatting issue

joshikalyani
8 - Asteroid

I'm facing issue for date format, If in  column, dates are in different format how to convert that into same format

joshikalyani_1-1675100009237.png

 

5 REPLIES 5
DataNath
17 - Castor

Hey @joshikalyani, here's one way you could handle this:

 

DataNath_0-1675100317949.png

 

As some of your dates are already in the correct format, we just need to convert those that aren't. The field is currently in string format so we can check for problem entries by checking whether ToDate() produces a null. If so, that means the record needs to be made into a Date which is when we bring in DateTimeParse() for the conversion.

ShankerV
17 - Castor

Hi @joshikalyani 

 

One way of doing this.

 

ShankerV_0-1675100671514.png

 

Many thanks

Shanker V

 

 

ShankerV
17 - Castor

Hi @joshikalyani 

 

Step 1: Input

 

ShankerV_0-1675100715479.png

 

 

Step 2:

ShankerV_1-1675100732523.png

ShankerV_2-1675100741989.png

 

 

Step 3: 

 

ShankerV_3-1675100761021.png

IF IsNull([DateTime_Out])
THEN [Field1]
ELSE [DateTime_Out]
ENDIF

 

ShankerV_4-1675100773459.png

 

Many thanks

Shanker V

 

 

 

 

 

ShankerV
17 - Castor

Hi @joshikalyani 

 

Step 4: Select tool

 

ShankerV_0-1675100834455.png

 

Many thanks

Shanker V

 

binuacs
20 - Arcturus

@joshikalyani One way of doing this

binuacs_0-1675102079087.png

 

Labels