Use of GlideDateTime in eval script of a pattern
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10 hours ago
Hi,
I need to transform timestamps into dates.
I try to use GlideDateTime in an EVAL script during table transformation, but I'm always getting an error.
Does anyone know, if it's in general supported, I couldn't find it documented and in the EVAL script examples kb article is no reference/ use of GlideDateTime.
Thanks for your support in advance
Thomas
2 REPLIES 2
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10 hours ago
share your script here
Regards,
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10 hours ago
That's the script:
set_field {
field_name = "first_hit"
value = eval {"javascript: var intValue= ${panorama_firewall_policies[].first_hit};
intValue=intValue*1000;
var gdt = new GlideDateTime();
var rtrn = gdt.setValue(intValue);
rtrn;"}
}
