After export as Excel time fields are showing seconds but i want to see it in only Hours and Minutes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-10-2023 11:42 PM
Hi,
After export as Excel time fields are showing seconds but i want to see it in only Hours and Minutes.
I want to see in the Excel only Hours and minutes.
Please help me out on the same.
Thanks,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2023 05:25 PM
Hi Ankur,
Please find the below screenshot:
It is working fine is there any possibility to see only Hours and Minutes which means
HH:MM format only because my customer is requesting the same.
Please help me out on this.
Thanks,

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-14-2024 04:43 AM - edited 06-14-2024 04:54 AM
Hi @kranthi2;
I've just had a similar requirement and solved it with this script:
(function calculatedFieldValue(current) {
// Create a GlideDuration object
var dur = new GlideDuration();
// Set the value of the GlideDuration object to the duration field
dur.setValue(current.duration);
// Get the total number of seconds from the duration
var totalSeconds = dur.getNumericValue() / 1000;
// Calculate hours and minutes
var hours = Math.floor(totalSeconds / 3600);
var minutes = Math.floor((totalSeconds % 3600) / 60);
// Format the time as "X Hours Y Minutes"
var formattedTime = hours + ' Hours ' + minutes + ' Minutes';
return formattedTime;
})(current);
Best regards
Thomas