Create a business age metric for problem record
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-26-2023 06:03 AM
hi,
we have a requirement to create a business age of problem metric. [ Business age = Total Age of Problem - Known error duration]. We are stuck in subtracting the duration field. Can anyone let me know how can we subtract two duration fields, get result of that and put that result in another duration field.
Thanks
Rohith
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-26-2023 06:23 AM
Hi,
You can use below logic.
var duration = new GlideDuration('3 12:00:00');
var duration2 = new GlideDuration('3:00:00');
var answer = duration.subtract(duration2);
gs.info(answer.getDisplayValue());
C |
If the provided solution meets your needs, kindly consider marking it as helpful and accepting it as the solution. This helps others who may have similar questions. |
Thanks and Regards,
Saurabh Gupta
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2024 07:48 AM
C |
If the provided solution meets your needs, kindly consider marking it as helpful and accepting it as the solution. This helps others who may have similar questions. |
Thanks and Regards,
Saurabh Gupta