Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

datediff between sys_createdon and sys_updatedon field in the sysapprover_approval table

Sooriya3
Giga Guru

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.

2 REPLIES 2

SumanthDosapati
Mega Sage

@Sooriya3 

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

sivasankaris
Tera Guru

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....