Scoped GlideTime - subtract(GlideTime startTime, GlideTime endTime)

Gets the duration difference between two GlideTime object values.

Table 1. Parameters
Name Type Description
startTime GlideTime The start value.
endTime GlideTime The end value.
Table 2. Returns
Type Description
GlideDuration The duration between the two values.
var gd1 = new GlideTime(); 
gd1.setDisplayValue("09:00:00"); 
var gd2 = new GlideTime(); 
gd2.setDisplayValue("09:10:00"); 
 
var dur = GlideDate.subtract(gd1, gd2); //the difference between gdt1 and gdt2 
gs.info(dur.getDisplayValue());

Output: