SELECT * FROM 表明 WHERE 日期字段名 BETWEEN '20130101' AND '20130130'。
例如:
select * from tb1 where dDate>='2010-11-05' and dDate<='2010-11-15' and convert(char(8),dDate,108)>='8:00:00' and convert(char(8),dDate,108)<='9:00:00'.
select * from table1 where year(d)=2010 and month(d)=7 and day(d) between 1 and 31and (Datepart(hour,d)>=22 or Datepart(hour,d)<6)