Number Intrinsic Functions - IsDate Method

Test if the variable is a date

Member of Number Intrinsic Functions (PRIM_LIBI.INumberIntrinsics)

Parameters

NameTypeData TypeDescription
Result*Result (Optional)BooleanTrue if the variable is a valid date
Format*Input (Optional)EnumerationFormat of the date

Details

IsDate will return True if the variable can be converted to a valid date in the specified format.
 
IsDate will often be used before AsDate to better handle potential date errors.

Allowed Formats

IsDate has many available formats. See the Feature Viewer (F2) or autocomplete in the IDE for additional information.

Example

In this example, IsDate expects a variable the format MMDDYY
If (#Variable.IsDate(MMDDYY)
   #Date := #Variable.AsDate(MMDDYY)
Endif

See also

All Component Classes

Technical Reference

Febuary 18 V14SP2