How to Subtract Two Variable Dates in a Report Using a Function Field?

Andrew Meza
Tera Expert

Hello Community,

I'm trying to configure a report in ServiceNow that calculates project duration by subtracting two date variables. However, I haven't found a way to use a function field directly on variables within the report builder.

Is there a recommended approach or workaround to achieve this? Any guidance would be greatly appreciated!

Thanks in advance!

 

AndrewMeza_0-1750884821048.png

 

2 REPLIES 2

Mark Manders
Mega Patron

I think you should do this the easy way: calculate the duration on a (hidden) variable and report on that. No report calculation needed (because it won't be easy to get that working).


Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark

Ankur Bawiskar
Tera Patron
Tera Patron

@Andrew Meza 

I believe there is a limitation and you cannot use variables directly in function field.

I agree with what Mark shared.

That would be much easier to handle rather than using function field

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