Date time Parse
- 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
Dear All,
Can you please advise how to parse a string field like this 10-Jul-20 09.29.32.521000000 AM. I need a standard date time format to allow performing a Date time difference between two dates.
Many thanks for your help in advance.
Regards
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @JAIN2 , try using datetimeparse function it will convert your date format into standard format that alteryx use.
Formula:
DateTimeParse(Substring([Field1],0,18)+" "+Right([Field1], 2),"%d-%b-%y %I.%M.%S %p")
I hope it helps.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @JAIN2 I mocked up a workflow let me know what you think?
- 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
@JosephSerpis great answer, although this doesn't round the seconds based on the milliseconds. @JAIN2 if you care about that, then you can amend Joseph's formula to:
datetimeparse(left([Date],16)+tostring(tonumber(substring([Date],16,5)),0)+" "+RIGHT([Date],2),"%d-%b-%y %I.%M.%S %p")
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thank you, It was a perfect solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thank you joseph..
