DIsplay mi_duration field value in "HH:MM:SS"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
8 hours ago
I have developed a pivot report in ServiceNow that calculates the total duration taken for an incident to move from New → Resolved, excluding the time when the incident was in the On Hold state.
Currently, the duration is displayed only in minutes (e.g., "1 minute", "5 minutes"), which appears to be the default behavior for duration fields in reports.
However, my requirement is to display the duration in minutes and seconds (mm format) instead of just minutes.
I have explored using:
- glide_duration fields
- GlideDuration in scripts
- getNumericValue() conversions
But none of these approaches seem to affect how the value is displayed in a pivot report.
Questions:
- Is it possible to display duration in mm format in a pivot report?
- If not supported out-of-the-box, what is the recommended approach (e.g., calculated field, database view, scripted field)?
- Has anyone implemented a similar requirement successfully?
Any guidance or best practices would be helpful.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
7 hours ago
Hi Nischith,
Yeah, this is a known limitation with reporting on duration fields.
In ServiceNow, pivot reports always render duration values using the platform’s default display format, which is typically rounded to minutes (like “5 minutes”). Even if you use GlideDuration or getNumericValue() in the backend, the report layer controls the final display, so those changes won’t reflect there.
Displaying duration in HH:MM:SS or mm:ss format is not supported out-of-the-box in pivot reports.
What you can do instead
1. Use a calculated field (recommended workaround)
Create a new field (string) and populate it with formatted duration.
Example logic:
- Convert duration to seconds
- Format into HH:MM:SS
- Store/display that value
Note: Pivot reports won’t aggregate this meaningfully, but it works for display.
2. Use a Database View + Scripted Field
If you need more control:
- Create a DB View
- Add a scripted/calculated field that formats the duration
Still, aggregation + formatting together is limited in pivot reports.
3. Report alternative (better option)
If format is important, consider:
- Scripted report
- Performance Analytics widget
- UI Builder visualization
These give you control over formatting (including seconds).
Important point
Even though the data is stored down to milliseconds, pivot reports only display duration in their predefined format, and that cannot be overridden via scripting.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
7 hours ago
you will require a custom field mostly for this which holds the value you expect in that format
use that field in pivot report
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
6 hours ago
Thanks for the suggestion.
However, using a custom field in this case seems to have a couple of limitations:
- The custom field would primarily be a string field, which works well for display purposes, but it cannot be effectively used in a pivot report for aggregation or calculations.
- Additionally, while extracting values from the existing duration field, the seconds component is already omitted (as it returns values like "minutes" or "days"), so even if I populate a custom field, the result would still be inaccurate and would not truly reflect the exact duration.
Because of these constraints, this approach doesn’t fully solve the requirement of getting precise minutes and seconds in the report.
If there’s a way to retain the exact duration (including seconds) and still make it usable within a pivot report, that would be helpful. Also, it would be great if you could share a bit more detail on how to implement this approach effectively.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
6 hours ago
then I doubt this is feasible
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader
