GlideDateTime - isValid()

Determines if a value is a valid date and time.

Table 1. Parameters
Name Type Description
Table 2. Returns
Type Description
Boolean True if value is valid, false otherwise.

Scoped equivalent

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

var gdt = new GlideDateTime("2011-08-31 aa:00:00"); //bad
gs.print(gdt.isValid()); //false

Output: false