DateTime Conversions
- 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
Hi there,
I have a last edited date column with days in the format 20180812 etc. I would like to change the format to 08-12-18 but the DateTime tool is giving me trouble. The type going in is V_String. I am getting NULL values for the output column..
Thanks!!
Solved! Go to Solution.
- Labels:
- Date Time
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
This would be a two-step process
1. You need to turn the string into a standard date (yyyy-mm-dd) - in this instance you're giving Alteryx the pattern the string is coming in
2. Once in the date format, you can parse it out as a string with the desired format
Example attached
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @nwatzlaf
The Date Time Tool should convert your string into a date format for Alteryx. So, if your input is 20180812, you'll need to use the custom format of yyyyMMdd (the capital Ms are needed). That should result in 2018-08-12
To convert it to the string format you want, use another Date Time tool, this time converting from date to string. using another custom code of MM-dd-yyyy
Basically, you're telling Alteryx what format your string is in, and then in the next tool, what format you'd like outputted.
Let me know if that works.
Cheers!
Esther
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I knew I was forgetting a step! Thanks so much for your help!!
