when executing a query in sql 2005
select getdate() what you get , suppose
2008-05-08 12:41:10.587
Is ther any query where i can get date only and the datatype should be in datatime.
Is there any datatype only " date " in sql 2005. I heard its in sql 2008 ?
My exact problem is
For example ,here startdate datatype is datetime.
select * from dbo.Emp where startdate between 2008-05-08 and 2008-05-08.
i am getting 0 rows here.
what is the best way to select this query.
hope i explained it clearly.
TIA
select getdate() what you get , suppose
2008-05-08 12:41:10.587
Is ther any query where i can get date only and the datatype should be in datatime.
Is there any datatype only " date " in sql 2005. I heard its in sql 2008 ?
My exact problem is
For example ,here startdate datatype is datetime.
select * from dbo.Emp where startdate between 2008-05-08 and 2008-05-08.
i am getting 0 rows here.
what is the best way to select this query.
hope i explained it clearly.
TIA
Comment