The CreatorCon Call for Content is officially open! Get started here.

How to get 2 days before and 1 day before date of "due" date field using schedule in servicenow

Harsha M V
Tera Contributor

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.

1 REPLY 1

Ankur Bawiskar
Tera Patron
Tera Patron

@Harsha M V 

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.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader