Skip to page contentSkip to chat
ServiceNow support
    • Community
      Ask questions, give advice, and connect with fellow ServiceNow professionals.
      Developer
      Build, test, and deploy applications
      Documentation
      Find detailed information about ServiceNow products, apps, features, and releases.
      Impact
      Accelerate ROI and amplify your expertise.
      Learning
      Build skills with instructor-led and online training.
      Partner
      Grow your business with promotions, news, and marketing tools
      ServiceNow
      Learn about ServiceNow products & solutions.
      Store
      Download certified apps and integrations that complement ServiceNow.
      Support
      Manage your instances, access self-help, and get technical support.
How do we calculate the incident duration field? - Support and Troubleshooting
  • >
  • Knowledge Base
  • >
  • Support and Troubleshooting (Knowledge Base)
  • >
  • How do we calculate the incident duration field?
KB0754082

How do we calculate the incident duration field?


31417 Views Last updated : Dec 10, 2024 public Copy Permalink English (Original)
  • English (Original)
  • Japanese
KB Summary by Now Assist

Issue

How to calculate the incident duration field?

Release

Any

Resolution

There are two Duration fields on Incident which are "Business duration" and "Calendar duration". Both Duration fields are calculated by the OOB business rule "mark_closed" on the incident table. 

These are the following code in the business rule: 

if (dataChange || current.business_duration.nil()) 
current.business_duration = gs.calDateDiff(opened, closed, false); 

if (dataChange || current.calendar_duration.nil()) 
current.calendar_duration = gs.dateDiff(opened, closed, false); 

Both Duration fields are actually calculated based on incident opened time and incident closed time only.

It is clear that duration for incident is calculated based on incident opened time and incident closed time only. It is calculated regardless what states incident has ever been set to. The duration of incident is simply the time difference between incident opened time and incident closed time. Putting incident in "Awaiting User Info" state would definitely affect the duration for the incident because the pause period would be counted into the duration in this case.

Example

Incident create time: 3pm
Put incident into Awaiting User Info time: 4pm
Change incident state back to Active: 5pm
Close incident: 6pm


For this example, the duration of the incident would be 3 hours because it is created at 3pm and is closed at 6pm.


Related Links

https://docs.servicenow.com/csh?topicname=c_ResolveTime.html&version=latest


The world works with ServiceNow.

Sign in for more! There's more content available only to authenticated users Sign in for more!
Did this KB article help you?
Did this KB article help you?

Attachments

Attachments

No attachments found

How would you rate your Now Support digital experience?

*

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

What can we improve? Please select all that apply.

What are we doing well? Please select all that apply.

Tell us more

*

Do you expect a response from this feedback?

  • Terms and conditions
  • Privacy statement
  • GDPR
  • Cookie policy
  • © 2025 ServiceNow. All rights reserved.