Description
Returns a value indicating whether an expression can be converted to a date.
Syntax
IsDate(expression)
The expression named argument can be any date or string expression recognizable as a date or time.
Remarks
IsDate returns True if the expression is a date or can legally be converted to a date; otherwise, it returns False. The range of valid dates is January 1, 100 A.D. through December 31, 9999 A.D.
See Also
CDate Function, Date Data Type, IsArray Function, IsEmpty Function, IsError Function, IsMissing Function, IsNull Function, IsNumeric Function, IsObject Function, TypeName Function, Variant Data Type, VarType Function.
Example
This example uses the IsDate function to determine if an expression can be converted to a date.
MyDate = "February 12, 1969" : YourDate = #2/12/69# : NoDate = "Hello" MyCheck = IsDate(MyDate) ' Returns True. MyCheck = IsDate(YourDate) ' Returns True. MyCheck = IsDate(NoDate) ' Returns False.