Like this article? We recommend
Data Type Validation Functions
The ISDATE and ISNUMERIC functions are similar to each other: They let you know whether the parameter passed is of a valid data type (date and time data type in case of ISDATE and numeric data type in case of ISNUMERIC). Both return a BIT value, as in the following:
SELECT ISDATE('february 39, 2002') AS 'february 39, 2002', ISDATE('1/1/2002') AS '1/1/2002', ISNUMERIC('abc') AS 'abc', ISNUMERIC('123') AS '123'
Results:
february 39, 2002 |
1/1/2002 |
abc |
123 |
0 |
1 |
0 |
1 |