How to convert this: 20220831T000000Z into a date time
Community Alums
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-20-2023 05:11 AM
How to convert this: 20220831T000000Z into a date time
5 REPLIES 5
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-26-2024 07:16 PM
You can also parse this format with help of GlideDateTime:
var $gdt = new GlideDateTime();
$gdt.setDisplayValue("20220831T000000Z", "yyyyMMdd'T'HHmmssX");
gs.debug($gdt.getValue());
This run in Scripts - Background prints:
*** Script: [DEBUG] 2022-08-31 00:00:00