How do i parse this date to datetime?
- 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 have a column with time in the format: 17 Jul 2019 11:15:16, it's in string format how do i parse to datetime? I have tried to specifiy the format using the parse function but it doesn't seem to be working. e..g i would like in format 17:07:2019 11:15:16
Solved! Go to Solution.
- Labels:
- Data Investigation
- Date Time
- Parse
- 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 @zsharif
A good solution from @LordNeilLord. His formula will convert your input to the format that Alteryx uses internally "2019-07-17 11:15:16". If you need to do any date time manipulations, adding intervals, comparing dates, extracting the year, etc, this is the format that the date will need to be in.
If you want your field in the format 17:07:2019 11:15:16, then you have to add another step.
datetimeformat([Field1],"%d:%m:%Y %H:%M:%S")
This will create a string field that you can use for output or display
Dan
- 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
