Im getting an error on this statement:
SELECT *
FROM
[My Table]
WHERE
ISDATE([DATE OF BIRTH])= 1
AND
CONVERT(DATETIME, [DATE OF BIRTH], 101)<'01/01/1899'
Because its evaluating the second condition first and running into non dates. Is there a way to change this where clause to guarantee it will exclude the non-dates? Also, because of the way the app was written with dynamic SQL, it has to be done in the where clause.
the error is :
The conversion of a nvarchar data type to a datetime data type resulted in an out-of-range value.
John Schroeder