access 获得今天到明天的时间的SQL

来源:百度知道 编辑:UC知道 时间:2024/05/30 13:16:56
在 ACCESS 中怎么获得从今天零点到明天零点的时间?
给下SQL 语句
不好意思,是我没说清楚,需求是这样的:
我想得到今天的所有数据(从昨天0:00到今天24:00的)
但是在ACCESS中不知道怎么些SQL语句

select convert(int,convert(datetime,convert(varchar(10),getdate()+1,120))-convert(datetime,convert(varchar(10),getdate(),120)))*24*60
这是分钟数
========================这样是一整昼夜的时间段内的数据
select * from tablename where
time>convert(datetime, convert(varchar(10),getdate()-1,120))
and time<=convert(datetime, convert(varchar(10),getdate(),120))