Scoped GlideDateTime - isValid()

Determines if a value is a valid date and time.

Table 1. Parameters
Name Type Description
None
Table 2. Returns
Type Description
Boolean True if value is valid; otherwise, returns false.
var gdt = new GlideDateTime(); 
gdt.setDisplayValue("2011-aa-01 00:00:00"); 
gs.info(gdt.isValid());

Output: false