Alteryx Designer Desktop Discussions

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

converting 12 hour time to 24 hour time

paigeblackstone
6 - 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!

3 REPLIES 3
ivoller
12 - 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.

Kenda
16 - Nebula
16 - Nebula

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.'

 

DanielG
12 - Quasar

https://help.alteryx.com/current/en/designer/functions/datetime-functions.html -- updated link to datetime functions as the above link goes to 404 error

Labels