Convert yyyymmdd to mm/dd/yyyyy
- 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 All:
I tried a number of ways to convert a v String into a standard date format, but to no avail. I used the parse tool with date feature, and still not able to get it to work.
I am sure its simple, but I can't get my head around which tool and configuration set up.
Thanks
Robb
Solved! Go to Solution.
- Labels:
- Tips and Tricks
- Workflow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @rrafferty2
The challenge here is what Alteryx considers a standard date format, which is yyyy-mm-dd
You can use 2 data time parse tools. One to turn the string into an alteryx date, and another to write back out into the desired string format.
Alternately, you can use the Formula tool with datetimeparse and datetimeformat functions.
Let me know if that helps.
Cheers!
Esther
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @rrafferty2,
You could use the following DateTimeParse function:
DateTimeParse(ToString([Date]),'%Y%m%d')
If this solves your issue please mark the answer as correct, if not let me know! I've attached my workflow for you to download if needed.
Regards,
Jonathan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
If you want to go the formula route:
DateTimeFormat(DateTimeParse([Date],"%Y%m%d"),"%m/%d/%Y")
It's a bit convoluted, but it works. Set the data type to string.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thank you. It works.
Robb
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thanks, Looks like I am allowed to pick only one solution. both are great.
Robb
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi,
I tried this but I am getting error: Argument1 of DATETIMEPARSE is not a string
