Tests whether a string value is a valid date.
IsDate ( datevalue )
Argument |
Description |
---|---|
datevalue |
A string whose value you want to test to determine whether it is a valid date |
Boolean. Returns true if datevalue is a valid date and false if it is not. If datevalue is null, IsDate returns null.
You can use IsDate to test whether a user-entered date is valid before you convert it to a date datatype. To convert a value into a date value, use the Date function.
This statement returns true:
IsDate("Jan 1, 95")
This statement returns false:
IsDate("Jan 32, 1997")
If the SingleLineEdit sle_Date_Of_Hire contains 7/1/91, these statements store 1991-07-01 in HireDate:
Date HireDate
IF IsDate(sle_Date_Of_Hire.text) THEN
HireDate = Date(sle_Date_Of_Hire.text)
END IF
IsDate method for DataWindows in the DataWindow Reference or the online Help