GlideDateTime - subtract(Number milliseconds)

Subtracts a specified number of milliseconds from the GlideDateTime object.

Table 1. Parameters
Name Type Description
milliseconds Number The number of milliseconds to subtract
Table 2. Returns
Type Description
void

Scoped equivalent

To use the subtract() method in a scoped application, use the corresponding scoped method: Scoped GlideDateTime - subtract(Number milliseconds).

var gdt = new GlideDateTime("2011-12-07 08:00:00");
gdt.subtract(1000);
gs.print(gdt.getValue());

Output: 2011-12-07 07:59:59