Creating a new system/metric unit - Hrs Mins
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2024 12:44 AM - edited 03-04-2024 12:56 AM
Hi Everyone,
I'm new to service now and exploring, Can we create new system/metric units like Hrs Mins,
The goal is to find the difference between two datetime columns in Hrs and Mins
For example:
Begin: 26-Jan-24 20:25:00
End: 27-Jan-24 07:00:00
difference: 10 Hrs 35 Mins
I used the following script to find out the hours due to which I use Hours as a Unit for the indicator
var diff = function(x, y) {
return y.dateNumericValue() - x.dateNumericValue();
};
var hours = function(x, y) {
return diff(x, y) / (60 * 60 * 1000);
};
hours(current.begin, current.end);
Is it possible to update the Javascript and create a new measuring unit to display 10 Hrs 35 Mins (Current display: 11 Hrs)
0 REPLIES 0