Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

date time format change

Zenani
8 - Asteroid

Hi Everyone I am trying to convert my date from 2020-02-07 09:31 to Aug-15-2016 00:00:00

 

I have tried Date Time Format([Date Time_Out],"%h-%d-%Y %H:%M:%S") and Date Time Parse([Date Time_Out],"%h-%d-%Y %H:%M:%S") but i keep getting a conversion error stating:  Formula (5) Date Time_Out: "Jan-07-2020 09:29:00" is not a valid Date Time

(please ignore the spaces in my formula i put them to get rid of the error message when uploading my query)

4 REPLIES 4
afv2688
16 - Nebula
16 - Nebula

Hello @Zenani,

 

Alteryx only accepts 2020-02-07 09:31 (yyyy-mm-dd HH:MM-SS) as a date time format, the other formats can be set as V_Strings or VW Strings if you want for visibility

 

I would recommend you to keep both columns for your whole analysis if you want and later post only the one you need.

 

I am sorry but there is no other way around for that if you want to keep them as a date.

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Regards

Jonathan-Sherman
15 - Aurora
15 - Aurora

Hi @Zenani,

 

You could use:

 

DateTimeFormat(DateTimeParse([Date],'%Y-%m-%d %H:%M'), '%b-%d-%Y %H:%M:%S') 

 

As @afv2688 has said it is only possible to store the date in this format as a string so if you need to use date attributes you won't be able to go down this route. It's done to remove the ambiguity when reading a date. 

 

image.png

If this solves your issue please mark the answer as correct, if not let me know! I've attached my workflow for you to download if needed.

 

Jonathan

Zenani
8 - Asteroid

Hi Jonathan

 

thank you! this solves my problem 

I will leave column format as VW_String

Amritanshu
5 - Atom

Thanks Jonathan, saved the day..

Labels