GlideDateTime - setGlideDateTime(GlideDateTime gDT)

Sets the date and time of the current object using an existing GlideDateTime object.

This method is equivalent to instantiating a new object with a GlideDateTime parameter.

Table 1. Parameters
Name Type Description
gDT GlideDateTime A GlideDateTime object
Table 2. Returns
Type Description

Scoped equivalent

To use the setGlideDateTime() method in a scoped application, use the corresponding scoped method: Scoped GlideDateTime - setGlideDateTime(GlideDateTime g).

var dt1 = new GlideDateTime("2011-01-01 12:00:00");
var dt2 = new GlideDateTime("2011-02-02 08:00:00");


2011-02-02 08:00:00