DB View Calculate difference between dates and add to third date field.

gsh1
Tera Contributor

Hi all,

 

We have a requirement where we have to show some date calculation in a report.

We have created a database view between two tables, now requirement is to calculate the difference between two Date time field and add it to the third date time field in this case it is SLA breach time.

Date difference I am calculating by creating function field and datediff function.

How do I add that difference in to third date time field and show on report

 
4 REPLIES 4

Ankur Bawiskar
Tera Patron

@gsh1 

you said you already created a function field and storing the difference.

then why not show that function field on report?

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

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

Hi Ankur,

 

Thanks for your message how to add that difference in third date time field and show in report.

Refer screenprint if that helps.

@gsh1 

this is feasible but there is a challenge when you use now() there

I shared a workaround for this and it has a working solution

Function field to calculate Ageing in Report Designer 

blog below for your reference

Function Fields in ServiceNow Reports: Calculate and Display Data on the Fly 

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

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

@gsh1 

Thank you for marking my response as helpful.

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

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