Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-31-2022 02:39 AM
you are correct on using GlideDateTime.subtract() method.
It's just that formatting needs to be corrected.
the date/time value you are passing to script include must be in logged in user's format as different users will have different date formats.
Ensure you set the correct value when you set the date/time in GlideDateTime object.
Can you share your script here and not screenshots?
Regards,
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader