Returns a Boolean value indicating whether an expression can be converted to a date.
Public Function IsDate(ByVal Expression As Object) As Boolean
IsDate returns True if the expression is of type Date or is a string convertible to type Date; otherwise, it returns False.
This example uses the IsDate function to determine if several variables can be converted to dates.
Dim MyDate, YourDate As Date Dim NoDate As String Dim MyCheck As Boolean MyDate = "February 12, 1969" YourDate = #2/12/1969# NoDate = "Hello" MyCheck = IsDate(MyDate) ' Returns True. MyCheck = IsDate(YourDate) ' Returns True. MyCheck = IsDate(NoDate) ' Returns False.
IsArray Function | IsDBNull Function | IsError Function | IsNothing Function | IsNumeric Function | IsReference Function | Object Data Type | Date Data Type | TypeName Function