GlideDateTime - add(Number milliseconds)

Adds a specified number of milliseconds to the GlideDateTime object.

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

Scoped equivalent

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

var gdt = new GlideDateTime("2011-08-31 08:00:00");
gs.print(gdt.getNumericValue());
gdt.add(10);
gs.print(gdt.getNumericValue());
Output:
1314777600000
1314777600010