I am trying to select all the values from a table using date in SQL Server 2008. The problem is the date
column in the DB is in Datetime
format. But the thing is I have to select all the values from the database by using date
I used the following query
select *
from Table
where subdate = '2012-12-12'.
It won't return any value....
My table is like this
Subdate val1 val2 val3 name
-------------- ----- ----- ---- -----
2012-12-12 12:32:12.000 2 1 2 ben
2012-12-27 15:17:32.533 2 1 2 yen
2012-12-27 15:20:06.660 2 1 2 sun
Thanks in advance.........