- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Monday
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Tuesday
try this
var date = fd_data.trigger.current.u_cc_cm_ass_date;
var gdt = new GlideDateTime(date + ' 00:00:00');
gdt.addDaysUTC(1);
// if saturday add 2 days to get monday
if (gdt.getDayOfWeekUTC() == 6) {
gdt.addDaysLocalTime(2);
} else if (gdt.getDayOfWeekUTC() == 7) {
gdt.addDaysLocalTime(1); // if sunday then add 1 day to get monday
}
return gdt.getDate();
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Tuesday
Hope you are doing good.
Did my reply answer your question?
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Tuesday
Hi @chandusnow2 ,
Did you try this?
var startDate = new GlideDateTime('2026-01-30 14:00:00');
var days = 1;
var dur = new GlideDuration(60 * 60 * 24 * 1000 * days);
var schedule = new GlideSchedule('08fcd0830a0a0b2600079f56b1adb9ae');
var end = schedule.add(startDate, dur);
gs.info(end.getDate().getValue());
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Tuesday
try this
var date = fd_data.trigger.current.u_cc_cm_ass_date;
var gdt = new GlideDateTime(date + ' 00:00:00');
gdt.addDaysUTC(1);
// if saturday add 2 days to get monday
if (gdt.getDayOfWeekUTC() == 6) {
gdt.addDaysLocalTime(2);
} else if (gdt.getDayOfWeekUTC() == 7) {
gdt.addDaysLocalTime(1); // if sunday then add 1 day to get monday
}
return gdt.getDate();
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Tuesday
Hope you are doing good.
Did my reply answer your question?
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Tuesday
@Ankur Bawiskar Tq for responce it is working fine as per requirement
