I am using a database with Microsoft SQL Server Management Studio.
I want to perform a very simple SQL request:
SELECT
[Date], [Price]
FROM
[mydatabase].[dbo].[Table]
WHERE
[Date] = CAST('2011-06-17 06:00:00' AS smalldatetime)
and I get the following error message:
The conversion of a varchar data type to a smalldatetime data type resulted in an out-of-range value
Of course Date
type is smalldatetime, but still having problems.
Can anybody help me with this?