IsDate function

Syntax

IsDate(Value)

Description

Use the IsDate function to determine if Value contains a valid date.

You can use this function when you want to determine if a value is compatible with the Date built-in function.

Uninitialized date variables, 0 numerics, or blank strings return true. If these values are possibilities for a variable passed to the IsDate function, you should add an additional check to ensure there is a value, such as using the All function.

Parameters

Parameter Description

Value

Specify either a string or number you want to search for a valid date. Value is a number of the format YYYYMMDD or string of the format YYYY-MM-DD.

Returns

A Boolean value: True if the string contains a valid date, False otherwise.

Example

If IsDate(&Num) Then 
   &Datevalue = Date(&Num); 
End-if;