SOLVED
Convert text date to date
Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
mszpot89
9 - Comet
‎11-05-2018
11:23 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Here are my sample dates
Monday, November 5, 2018 8:38 AM Wednesday, October 10, 2018 2:51 PM
How can I get them converted into below format
2018-11-05 2018-10-22
Solved! Go to Solution.
Labels:
- Labels:
- Date Time
- Preparation
- Regex
- Tips and Tricks
- Workflow
3 REPLIES 3
CharlieS
17 - Castor
‎11-05-2018
11:36 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Here's the formula used to parse that format:
DateTimeParse([Input],"%A, %B %d, %Y %I:%M %p")
I recommend keeping this page bookmarked:
https://help.alteryx.com/9.5/Reference/DateTimeFunctions.htm
Thableaus
17 - Castor
‎11-05-2018
11:38 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @mszpot89
Sorry I had not seen Charlie's reply.
I'd add the DateTimeFormat function to remove the time.
DateTimeFormat(DateTimeParse([Field1], "%A, %B %d, %Y %I:%M %p"),"%Y-%m-%d")
Cheers,
‎11-05-2018
12:21 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@Thableaus - I modified @CharlieS solution also to skip time.
DateTimeParse([Date of query receive],"%A, %B %d, %Y")