DateTime Format
- 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!
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!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @RMcB ,
You can use the DateTime tool to do operations like that.
Be aware that your column will now be type string. Dates in Alteryx has the yyyy-mm-dd format
Best,
Fernando Vizcaino
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thank you, Fernando! I have to add 24 after the hours (MM/DD/YYYY HH24:MI:SS). Any idea how to do this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thank you!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thank you!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
This worked, but now I need to remove the leading 0 for hours 1-9 (circled below). Is this possible?
