Convert DD-MMM-YYYY to MM/DD/YYYY
- 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
I currently have a column (column 1) with dates in the following format: 01-JUL-2019. The select tool tells me Alteryx reads the dates as V_String. I want to create a new column (column 2) next to column 1 and convert all of the dates to the following format: 07/01/2019.
Can anyone help? Thank you!
Solved! Go to Solution.
- Labels:
- Date Time
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @JuanH ,
For that, you can use 2 datetime tool, one to transform your string into a date, then transform to your desired format.
Best,
Fernando Vizcaino
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @JuanH ,
The attached solution is also similar to all of the above.
Knowing the specifiers for the dates does the trick and you can check the help documentation for your reference:
https://help.alteryx.com/current/designer/datetime-functions
- 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
Hi, is there any way to keep the data type as 'Date' on the new format? Seems all these end in the V_W String format. Which is not usable when then filtering by this column for anything date based.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@MATTHEW_KING1 No, in order to be treated as a date and work in date-based operations it must be in the Alteryx date format of yyyy-mm-dd.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@Luke_C Thanks, so therefore it is impossible to output in a date format of mm/dd/yyyy once you have converted from a string to Alteryx date format? Seems restrictive. I understand the need for the format within Alteryx, but thought on output you could convert to any desired format?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@MATTHEW_KING1 You can format it however you want on the output, in Alteryx it would be a string. That's not to say that wherever you're outputting to wouldn't support (or require) a different date format.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator