Scoped GlideDateTime - toString()

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. This method is equivalent to getValue().

Table 1. Parameters
Name Type Description
None
Table 2. Returns
Type
String The date and time stored by the GlideDateTime object in the system time zone and format.
var gdt = new GlideDateTime("2011-08-31 08:00:00");
gs.info(gdt.toString());

Output: