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 |
|
amit.2601
Starting Member
8 Posts |
Posted - 2010-02-04 : 23:39:08
|
| Hi,I have to fetch data every day between 10 to 10.30 Am in the morningand i want to create filter in Date so that daily i can fetch Data between this time |
|
|
senthil_nagore
Master Smack Fu Yak Hacker
1007 Posts |
Posted - 2010-02-05 : 00:09:19
|
| select * from table_name where datepart(hh,date_time_column)=10 and datepart(MI,date_time_column)<=30Senthil.C------------------------------------------------------[Microsoft][ODBC SQL Server Driver]Operation canceledhttp://senthilnagore.blogspot.com/ |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-02-05 : 11:02:06
|
| [code]select * from table_name where date_time_column > = dateadd(dd,datediff(dd,0,getdate()),'10:00:00')and date_time_column < dateadd(dd,datediff(dd,0,getdate()),'10:31:00')[/code] |
 |
|
|
|
|
|