Scoped GlideDuration - getByFormat(String format)

Gets the duration in the specified format.

Table 1. Parameters
Name Type Description
format String The duration format.
Table 2. Returns
Type Description
String The current duration in the specified format.
var dur = new GlideDuration('3 22:00:00');
gs.info(dur.getByFormat('HH:mm'));

Output: