Alteryx Designer

Find answers, ask questions, and share expertise about Alteryx Designer.
Register for the upcoming Live Community Q&A Session - and don't forget to submit your questions for @DeanS regarding the future role of analytics here.
SOLVED

DateTime Format

Highlighted
6 - Meteoroid

Hello!

 

I'm new to Alteryx and have a column named "RS_RECORDED_DATETIME" that is currently in the format yyyy-mm-dd mm:ss. I need to convert it to mm/dd/yyyy hh24:mi:ss.

 

Should I create a formula for this or use datetime parse? 

 

Thank you!

Highlighted
Alteryx Certified Partner
Alteryx Certified Partner

Hi @RMcB ,

 

You can use the DateTime tool to do operations like that.

fmvizcaino_0-1593561682538.png

Be aware that your column will now be type string. Dates in Alteryx has the yyyy-mm-dd format

 

Best,

Fernando Vizcaino

 

Highlighted
6 - Meteoroid

Thank you, Fernando! I have to add 24 after the hours (MM/DD/YYYY HH24:MI:SS). Any idea how to do this?

Highlighted
Alteryx Certified Partner
Alteryx Certified Partner

Hi @RMcB ,

 

I'm not sure if I understood you right. Do you want to add the number 24 in between your hours, right?

If yes, I'm attaching an example here.

Best,

Fernando Vizcaino

Highlighted
Alteryx
Alteryx

I believe the approach outlined above should work for your purposes.

 

I do want to note that by formatting the data in this manner, you are converting the data to a STRING rather than a DATETIME value. As a result, you won't be able to use the new value for datetime functions (datetimeadd, datetimediff, etc.). If you do need to perform calculations with these values, you'll need to use the original field. 

 

echuong1_0-1593568872526.png

 

Highlighted
6 - Meteoroid

Thank you!!

Highlighted
6 - Meteoroid

Thank you!!  

Highlighted
6 - Meteoroid

This worked, but now I need to remove the leading 0 for hours 1-9 (circled below). Is this possible?

 

RMcB_0-1593581372717.png

 

Labels