Hi,
I am getting the error "The conversion of a varchar data type to a datetime data type resulted in an out-of-range value."
when converting date in format Date in varchar(50) format MM/DD/YYYY HH:MM into YYYY-MM-DD format using MS SQLServer 2008 R2.
Please note that the date in column is Date(varchar(50), null).
I used the following syntax:
SELECT CONVERT(VARCHAR(10), Date, 102) AS Day
FROM dbo.[RCap_2G MM/Operator]
WHERE (CONVERT(VARCHAR(10), Date, 102) > { fn NOW() } - 1)