Convert date from "MM/DD/YYYY HH:MM AM/PM" format to only "MM/DD/YYYY"
- 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 date field "11/5/2019 9:00 AM" which I want to remove the time portion to only have "11/5/2019". What can I do?
It is currently in V_Wstring format.
Thanks so much for your help!
Solved! Go to Solution.
- Labels:
- Date Time
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @adeyang if you just want to remove the time portion use a left function. Alteryx will only recognize YYYY-MM-DD as a true date format I mocked up a workflow which shows how to remove the time portion and convert your date into a format alteryx will reconize as a time format as well.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @adeyang , You can try this.
Formula: Datetimeformat(DateTimeParse([Date],"%m/%d/%y %I:%M %p"),"%m/%d/%Y")
In case you have different date format and want to omit time you can do this.
Formula: left([date],9)
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thank you both, it works! 🙂
