I get this error when I run the following code:
Conversion failed when converting date and/or time from character string.
Declare @t date
Set @t = DATEADD(DAY, -75, GETDATE())
Select * from
(
SELECT changeField, CONVERT(date, newValue) newDate, changeDateTime, pubId, changeType, @t today
FROM ChangeLog
WHERE ISDATE(newValue) = 1
) dates
where newDate < today
If I comment out where newDate < today
, it works. There should not be any conversion in the where clause.