How to get 2 days before and 1 day before date of "due" date field using schedule in servicenow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-17-2025 10:49 PM
Hello All,
I have a field called as "due date" which is a date field. I need to get 2 days before and 1 day before date and store it in flow variables flow designer.
While checking 2 days before date and 1 day before date, it has to ignore the weekends and holidays and provide the date.
For example: If due date is Monday, then 2 days before should be Thursday and 1 day before should be wednesday as it ignores weekends as per cmn_schedule table.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-17-2025 10:58 PM - edited 03-17-2025 10:59 PM
you can use flow variable and use Set Flow Variable logic and use inline script.
refer this link on how to subtract and get days using schedule
you want to subtract the dates using schedule
check this link
Calculate Date By Adding or Subtracting Time With A Schedule
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader