SOLVED
Converting 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
nirvapatel1998
7 - Meteor
‎08-12-2022
07:06 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi All.
I have a date format 9-Aug-22 and I want to convert it to 20220809. Any suggestions on how I can get it?
Thank you in advance.
Solved! Go to Solution.
Labels:
- Labels:
- Best Practices
5 REPLIES 5
17 - Castor
‎08-12-2022
07:10 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hey @nirvapatel1998, this should do the trick. You first parse out the date from your incoming string, before wrapping that in the DateTimeFormat() function to get your desired format:
DateTimeFormat(DateTimeParse([Incoming Date],'%d-%b-%y'),'%Y%m%d')
DavidSkaife
14 - Magnetar
‎08-12-2022
07:10 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Assuming your date is in string format:
DateTimeFormat(DateTimeParse([Date],'%d-%h-%y'),'%Y%m%d')
DavidSkaife
14 - Magnetar
‎08-12-2022
07:12 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@DataNathalmost snap :)
‎08-12-2022
07:15 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thank you DataNath
‎08-12-2022
07:16 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thank you David
