Need help converting string to date
- 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
Hello, I am trying to convert string to date with the select tool, but that isn't working.
Here is the current format as a string, and the desired format as a date
Before;
12-OCT-22
After:
10-12-2022
If anyone can help that would be appreciated.
Thanks
- Labels:
- Date Time
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
You cant convert that format of date using the select too. You need to use a formula tool or the date/time parse tool.
In the formula tool, you can use this to parse the date DateTimeParse([date],"%d-%b-%y")
Assuming you need this as an actual date value and not a string, make sure to set the new field to be of Date data type or it will just be a string that looks like a date.
*Edit*
Didnt notice you had a different format as the desired date output which means you want it as a string and not a Date datatype.
The formula for that would be DateTimeFormat(DateTimeParse([date],"%d-%b-%y"),"%m-%d-%Y")
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@Hoss2434
We can also use two DateTime tools to do it.
