We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Change string date format to Date format

wendyzjy
8 - Asteroid

hi experts,

I met a problem on the string dates format:

I would like to change the string date format to Date format, eg. change string date "06-DEC-2023" to date format "2023-12-06",

the formula doesn't work in this way: DateTimeformat([Date],'%m-%d-%y'), it shows: Formula (13) DATETIMEFORMAT: "06-DEC-2023" is not a valid Date or Time

also not work in this way: DateTimeparse([PO Creation Date],'%m-%d-%y'), it shows: Formula (13) DATETIMEPARSE: Cannot convert "06-DEC-2023" to a date/time with format "%m-%d-%y" and language "English": Month number is out of range 1..12: '06-DEC-2023'

Can you help with the formula please?

 

 

 

3 REPLIES 3
flying008
15 - Aurora

Hi, @wendyzjy 

 

FYI.

 

DateTimeParse([Your Field],'%d-%b-%Y')

录制_2024_03_15_15_26_43_803.gif

Qiu
21 - Polaris
21 - Polaris

@wendyzjy 

We can also use the DateTime tool, it is more easy to use.

The DataTime function is a very powerful, recommend you to read this.

https://help.alteryx.com/current/en/designer/functions/datetime-functions.html#idm45271966381712

01315-wendyzjy.png

wendyzjy
8 - Asteroid

oh, it helps too, thank you!!

Labels
Top Solution Authors