- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-30-2023 02:02 AM
Hi,
In my xlsx file the Date filed is written: 04-AUG-2022
Is there any way to change the date format in the transform map so it will know how to get this format from the xlsx file?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-30-2023 03:23 AM
Hi @Alon Grod ,
No we don't have that date format in ServiceNow. ServiceNow date fields will not take if you pass 04-AUG-2022 like this.
ServiceNow Community MVP 2024.
Thanks,
Pavankumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-30-2023 02:18 AM
Try
(function executeRule(current, previous /null when async/) {
var gd = new GlideDate();
current.'your fieldname' = gd.getByFormat('YYYY-MM-DD');
})(current, previous);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-30-2023 02:23 AM
@SoniaShridhar13 i need DD-MMM-YYYY
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-30-2023 02:25 AM - edited 01-30-2023 02:26 AM
var gdt = new GlideDate(source.your_date_field); var dt = gdt.getByFormat("dd/MM/yyyy"); return dt;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-30-2023 02:31 AM
it will return in the system 04-AUG-2022? @SoniaShridhar13
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-30-2023 02:31 AM
Yes