Alteryx Designer Desktop Discussions

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

Date Format

MonaAlmutairi
8 - Asteroid

Hello everyone,

 

I want to change the date format I had from 2021-01-05 to 01/05/2021 (MM/DD/YYYY)

 

I've tried to do:

 

DateTimeFormat(DateTimeParse([StartDate],"%Y%m%d"),"%m/%d/%Y")

 

 

but it didn't work with me.

 

Any suggestions?

 

Thank you in advance!

 

5 REPLIES 5
ShankerV
17 - Castor

Hi @MonaAlmutairi 

 

Please find the expected result.

 

DateTimeFormat([Field1],"%m/%d/%Y")

ShankerV_0-1674539815498.png

 

Note: The workflow used to achieve the solution is attached which can be downloaded to see how the solution works.

 

If you believe your problem has been resolved. Please mark helpful answers as a solution so that future users with the same problem can find them more easily!!!!

 

Many thanks

Shanker V

ShankerV
17 - Castor

Hi @MonaAlmutairi 

 

You might have tried to store the output in the same column.

 

The same column will be in Date Datatype, but the date which you are saving is not in Date format.

 

Hence the result is stored in the new column with datatype string.

ShankerV_0-1674540019234.png

 

 

If you believe your problem has been resolved. Please mark helpful answers as a solution so that future users with the same problem can find them more easily!!!!

 

Many thanks

Shanker V

ShankerV
17 - Castor

Hi @MonaAlmutairi 

 

Solution 2: If you need the output to be stored in the same column.

 

Try with multi field formula.

 

ShankerV_0-1674540241534.png

 

Note: The workflow used to achieve the solution is attached which can be downloaded to see how the solution works.

 

If you believe your problem has been resolved. Please mark helpful answers as a solution so that future users with the same problem can find them more easily!!!!

 

Many thanks

Shanker V

 

 

 

MonaAlmutairi
8 - Asteroid

@ShankerV Thank you!! yes the issue is because I'm using the same column to write the new format to! It solved by only add new column for that!

 

 

ShankerV
17 - Castor

Hi @MonaAlmutairi 

 

If you need the output in the same column, then you can use the solution 2

Multi field formula helps to change the datatype also performs the formula function together for you.

 

You can choose based on your business needs and outcome expected.

 

Many thanks

Shanker V

Labels
Top Solution Authors