Function Not Calculating Duration Correctly – Showing Incorrect Time
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2025 08:32 AM
Hello, ServiceNow Community!
I’m running into an issue with a custom function that’s supposed to calculate the duration between the request creation date and the closed time, but the results are not correct.
For example, in the attached screenshot, the request was opened for about a month, but the calculated duration is showing as only 2 hours and 51 minutes.
I’ve double-checked the function and the fields being referenced, but I can’t figure out why the calculation is incorrect. I’ve also reviewed several similar solutions on the community, but none of them have resolved the issue.
Here is how the function field is setup:
This is the output:
0 REPLIES 0