datediff between sys_createdon and sys_updatedon field in the sysapprover_approval table
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12 hours ago
datediff between sys_createdon and sys_updatedon field in the sysapprover_approval table is reflecting as 23 hours+ when I use a configuration field to report on difference between the time the request was submitted and approved. Why is that so? and how to fix it? I basically need to report on how long each approval took from the time the request was created.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11 hours ago
You can fulfill your requirement using metrics.
You can create a metric definition(metric_definition) on sysapproval_approver table.
Accept the solution and mark as helpful if it does, to benefit future readers.
Regards,
Sumanth
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11 hours ago
Hi @Sooriya3 ,
This behavior is expected and happens for two main reasons.
1. sys_updatedon is NOT the approval time
the sys_updated_on field changes every time anything happens to the record. If a system background job, a workflow activity, or even a UI action touches that record after it was approved, the timestamp moves forward. You aren't measuring "Time to Approve"; you're measuring "Time since creation until the last time the system touched this record."
2. Time zone conversion impact
ServiceNow stores all date/time values in UTC internally.
So if:
Your timezone = IST (UTC +5:30)
Server timezone = UTC
The system converts time for display and reports. This often results in 18–24 hours difference, especially when the approval crosses a date boundary.
So that 23+ hours you’re seeing is usually a timezone conversion effect, not the real approval delay.
please mark it as helpful, if it is useful and accept my solution....
