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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-25-2025 01:53 PM
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!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-25-2025 11:40 PM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-25-2025 11:51 PM
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.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader