
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-27-2017 08:55 AM
I want a field to display the difference between two times in minutes.
Eg: Business Duration = 136
Solved! Go to Solution.
- Labels:
-
Incident Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-27-2017 11:00 AM
Hello Santhana
Please try below. g_form doesnot work server side
(function calculatedFieldValue(current) {
var dateString1 = new GlideDateTime(current.begin); //make sure variable name is begin
var dateString2 = new GlideDateTime(current.end); // make sure variable name is end
var diffSeconds = gs.dateDiff(dateString1, dateString2, true);
diffMins = diffSeconds/60;
return Math.round(diffMins); // return the calculated value
})(current);
Please mark my response as correct and helpful if it helped solved your question.
-Thanks

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-27-2017 10:08 AM
I am unable to add this attribute.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-27-2017 10:19 AM
An admin would need to add the attribute. If you switch over to the 'advanced' view of the dictionary record you can just drop max_unit=minutes into the attributes field.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-27-2017 10:28 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-27-2017 10:32 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-27-2017 10:30 AM