--查询当天:
select * from info where DateDiff(dd,datetime,getdate())=0
--查询24小时内的:
select * from info where DateDiff(hh,datetime,getDate())<=24
--info为表名,datetime为数据库中的字段值
http://blog.sina.com.cn/s/blog_b3eabfd30102w0m5.html