Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
eem_2055
Yak Posting Veteran
69 Posts |
Posted - 2008-04-07 : 01:50:20
|
| Hey guys..pls helpwhat query should I do? Obtaining certain date only using SQL server2000?Thnx... |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-04-07 : 01:52:58
|
| WHERE DateCol >= @StartDate AND DateCol <=@EndDatewhere @StartDate & @EndDate represent your daterange & DateCol is your table field containing date value.If this doesnt answer your query you need to explain in detail what you're looking for. |
 |
|
|
kiruthika
Yak Posting Veteran
67 Posts |
Posted - 2008-04-07 : 01:57:14
|
| Hi, Use appropriate convert function to get the date only from a datetime column.kiruthikahttp://www.ictned.eu |
 |
|
|
eem_2055
Yak Posting Veteran
69 Posts |
Posted - 2008-04-07 : 02:03:34
|
| thanks a lo1 !:) |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2008-04-08 : 05:41:41
|
quote: Originally posted by kiruthika Hi, Use appropriate convert function to get the date only from a datetime column.kiruthikahttp://www.ictned.eu
Thats not advisable. You shouldnt convert dates to varrchars and compare. To omit time part, use thisselect dateadd(day,datediff(day,0,getdate()),0)MadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|