Schedule Object working ? (new GlideSchedule) .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-30-2022 02:10 AM
Hello All,
As we know if i want to find dateTime after 2 days from now using some schedule, we will use
var Sc = new GlideSchedule('sys_id');
Sc.add(currentDateTime, duration);
Is there any way i can get dateTime 2 days ago using same schedule???
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-30-2022 02:19 AM
Hi,
yes it's possible
check this
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-02-2022 01:18 AM
Hello Ankur, You might miss interpreted the question. I don,t want to add the days to schedule, I want to substract the days from a given schedule.
For eg. Duration is 8 hours and end time is current date time. I want to find the start time here.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-03-2022 12:23 AM
Hi,
for subtraction check this
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-30-2022 02:52 AM
Let me check I understand the requirement...
So given a target date and time to deliver you want to extrapolate back and find the latest start datetime to make that delivery date?
It doesn't seem possible using GlideSchedule but it seems like a valid use case, might be worth submitting an idea?