 |
Purpose
Determines whether the supplied argument is a valid date. It returns TRUE or FALSE depending on whether the supplied argument is a valid date.
Syntax
IsDate (DateExpression)
DateExpression |
A string, date, or any numeric data type. |
Example
Sub Main()
Dim d As Date
Dim s As String
s = "1/2/97"
If IsDate(s) Then
d=s
Print "Valid date format"
Else
Print "Invalid date format"
End If
End Sub
|  |