Calculate the date difference using flow design

Priya Rao
Tera Contributor

Hi All,

 

Based on some trigger conditions, we need to submit a catalog item request. This is done using he subflow and business rules and it's working as expected. 

So now, on the form that we're using for trigger conditions, there's a field 'start_date' and 'end_date'. Based on that dates, when the catalog item request is auto-submitted, we need to calculate the difference in the days (end_date - start_date) not directly from he value in the table. Instead, we need to store the values in the variables in the RITM, then calculate the difference and then store that difference value in the field in the form. How can I achieve this using the same flow design and then update the record. 

 

@Ankur Bawiskar @Rahul Talreja @Pavankumar_1 @Manmohan K @Vishal Birajdar @Dr Atul G- LNG @AnveshKumar M @SwarnadeepNandy 

7 REPLIES 7

@Priya Rao 

your question is to to store the start date and end date in catalog variables and also the difference of those dates in some catalog variable or some field on form?

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

@Ankur Bawiskar 

I want to get the start date and end date value from the form and then calculate the difference and store it in the variable and then pass that value to the field in the form.

OlaN
Giga Sage
Giga Sage

Hi,

Not really sure what you need help with, but I've created a tool that can help you with date calculations in Flow Designer, check it out if you like.