I get this error message when I try to "order by" a column of dates that has mostly valid dates, but contains some invalid dates
select * from gnames order by format(cdate(dob),'yyyymmdd')
DOB might have values like:
1/1/1964
3/5/1982
about 1971
?
Is there a way to order by this date column, but throw out the bad dates without the query dying with that error message? Or trap the error in the query statement so that it displays only the good date values?