converting 12 hour time to 24 hour time
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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!
Solved! Go to Solution.
- Labels:
- Data Investigation
- Date Time
- Help
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.'
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
https://help.alteryx.com/current/en/designer/functions/datetime-functions.html -- updated link to datetime functions as the above link goes to 404 error
