community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
#SANTALYTICS

The highly anticipated Alteryx Community tradition is back! We hope you'll join us!

Learn More
SOLVED

converting 12 hour time to 24 hour time

Highlighted
Meteoroid

Hello again!

 

I recently posted another question about DateTime stuff that has since been resolved, however I have come across another issue and am wondering if there is a way to fix in Alteryx.

 

I have 2 columns of data, one being inquiry created date, the other being inquiry closed date. Both columns are DateTime data types. The issue here is that some of these dates/times up and down the column are in 12 hour time, whereas the rest are in 24 hour time. I am not sure which ones are in 12 hour time specifically, but I need all of the values to be in 24 hour time.

 

Does anyone know of a way I can fix this in Alteryx?

 

Any help you can provide is much appreciated. Thanks again!

Quasar

Please post sample data.

 

The DateTime conversion tool is almost certainly your friend when it comes to converting from yyyy-MM-dd hh:mm:ss %P to yyyy-MM-dd hh:mm:ss but I'd need to see the data before offering more advice.

Pulsar
Pulsar

Hey @paigeblackstone

 

Referring to this article again, https://help.alteryx.com/current/Reference/DateTimeFunctions.htm, I would suggest using the following function:

 

DateTimeFormat(dt,f)

where 

     dt: DateTime data, expressed as a selected column or a specified DateTime value between quotes.

     f: The format to which to convert the data, expressed in a format string.

At the bottom of this web page you will see a section called specifiers. Here it tells you that '%H' can return the 'Hour in 24 hour clock, 00 to 23.'

 

Labels