- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-02-2025 04:22 AM
How to calculate ageing via function field in Report designer
Ageing calculation is basically a difference between created date and current date
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-02-2025 08:00 PM
that's correct, it won't allow you to write now() but you can go to dictionary and update that script
the 1st screenshot is from the article I shared
sharing again
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-02-2025 04:40 AM
Hello @Piyush Dwivedi, you can't do the date calculation in function field directly in Report. However, you can create a function filed in the respective table and select the same while creating the report.
please use following script in the function field:
glidefunction:datediff(now(),created_date)
Regards,
Nishant
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-02-2025 01:13 PM
I will note this order matters and that there were older postings saying you could not use now() in a function field but it seems you can now (I tested in Xanadu). Created_date field is also typically: sys_created_on
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-02-2025 04:44 AM
Hello,
Calculating "ageing" in a Report Designer typically involves determining the difference between a specific date (e.g., invoice date, created date, last updated date) and a current or reference date. The exact steps and functions will vary depending on the specific Report Designer software you are using (e.g., SAP, ServiceNow,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-02-2025 04:57 AM
very well explained here
Function Fields in ServiceNow Reports: Calculate and Display Data on the Fly
Remember you cannot use now() directly but there is a trick to update that field in dictionary
As per the link I shared it says invalid syntax, but there is a workaround for that
It worked fine for me see below when I used that workaround
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