IsDate

The IsDate function returns Returns a true or false indicating whether an expression represents a valid Date.

The IsDate function uses local setting to determine if a string can be converted to a date ("January" is not a month in all languages.

Syntax

IsDate(expression)
Parameters Description
Expression Required. The expression to be evaluated.

Examples :

Example 1

To get the legal dates :

dIsDate = (IsDate("April 22, 1947"))
dIsDate = (IsDate(#01/31/10#))
DEBUG(dIsDate)

Result :

dIsDate
= True
= True

Example 2

To get Illegal Dates :

dIsDate = (IsDate("#01/31/10#"))
dIsDate = (IsDate("52/17/2010"))
dIsDate = (IsDate("Hello World!"))
DEBUG(dIsDate)

Result :

dIsDate
= False
= False
= False