GlideDateTime - getValue()

Gets the date and time value stored by the GlideDateTime object in the internal format, yyyy-MM-dd HH:mm:ss, and the system time zone, UTC by default.

Table 1. Parameters
Name Type Description
None
Table 2. Returns
Type Description
String The date and time in the internal format and system time zone.

Scoped equivalent

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

var gdt = new GlideDateTime("2011-08-31 08:00:00");
gs.print(gdt.getValue());

Output:

2011-08-31 08:00:00