In case you missed the announcement: Alteryx One is here, and so is the Spring Release! Learn more about these new and exciting releases here!

Alteryx Designer Desktop Discussions

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

Need help converting string to date

Hoss2434
7 - Meteor

Hello, I am trying to convert string to date with the select tool, but that isn't working.

Here is the current format as a string, and the desired format as a date

 

Before;

12-OCT-22

 

After:

10-12-2022

 

If anyone can help that would be appreciated.

 

Thanks

 

 

2 REPLIES 2
SPetrie
13 - Pulsar

You cant convert that format of date using the select too. You need to use a formula tool or the date/time parse tool.

In the formula tool, you can use this to parse the date DateTimeParse([date],"%d-%b-%y")

SPetrie_0-1675983715091.png

Assuming you need this as an actual date value and not a string, make sure to set the new field to be of Date data type or it will just be a string that looks like a date.

 

*Edit*

Didnt notice you had a different format as the desired date output which means you want it as a string and not a Date datatype.

The formula for that would be DateTimeFormat(DateTimeParse([date],"%d-%b-%y"),"%m-%d-%Y")

SPetrie_0-1675983998895.png

 

 

 

 

Qiu
21 - Polaris
21 - Polaris

@Hoss2434 
We can also use two DateTime tools to do it.

0210-Hoss2434.PNG

Labels
Top Solution Authors