Unicode Intrinsic Functions - IsDate Method

Test if the variable is a date

Member of Unicode Intrinsic Functions (PRIM_LIBI.IUnicodeIntrinsics)


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


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.


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

See also

All Component Classes

Technical Reference

LANSA Version 15, April 2020