请教时间比较问题!!
我用access做的数据库,里面存储的时间格式是2004-9-2 9:45:06
现在我想比较存储的时间是否是当天的。应该怎样比较?请指点!!多谢!!
问题点数:0、回复次数:3Top
1 楼bzscs(沙虫 我爱小美)回复于 2004-09-04 08:49:18 得分 0
select * from table where datediff('d',[datetime],date())=0Top
2 楼s1ihome(My hometown is a beautiful village)回复于 2004-09-04 08:54:41 得分 0
select * from table where datediff('d',[datetime],date())=0
or
select * from table where year(datetime)=year(date()) and month(datetime)=month(date()) and day(datetime)=day(date())
Top
3 楼cd408(冬约)回复于 2004-09-04 09:00:42 得分 0
多谢指点Top




