Scoped GlideTime - getByFormat(String format)

Gets the time in the specified format.

Table 1. Parameters
Name Type Description
format String The time format.
Table 2. Returns
Type Description
String The time in the specified format.
var gt = new GlideTime(); 
gt.setValue('12:00:00');
gs.info(gt.getByFormat("HH:mm"));

Output: