Scoped GlideDateTime - setGlideDateTime(GlideDateTime g)

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
g GlideDateTime The object to use for setting the datetime value.
Table 2. Returns
Type Description
var dt1 = new GlideDateTime("2011-01-01 12:00:00");
var dt2 = new GlideDateTime("2011-02-02 08:00:00");