How to check which date comes first between two variables in wait for condition activity of workflow

Epapra Polugari
Tera Contributor

Hello Community, 
I have a requirement in which I need to compare two date variables in wait for condition. Let say Date1 and Date2. 
I want to trigger a notification 5 days before the lesser date among date1 and date2. And am checking that in 'Wait for activity'. 

Please help me to achieve this. 

TIA

1 REPLY 1

Saurav11
Kilo Patron
Kilo Patron

Hello,

 

You can achieve this using Timer instead of wait for condition.

 

And for the script part you can use the below post as reference

 

https://www.servicenow.com/community/developer-forum/help-with-script-for-timer/m-p/1933930

 

Please mark my answer as correct based on impact.