日期:2014-05-17  浏览次数:20813 次

怎么样比较当前时间和设定的时间
比如想在一个页面中加一个判断,当前时间小于设定时间才开始执行
<%   if   now() <2007-1-24   12:05:25  
then   %>
这样写为什么不行

------解决方案--------------------
if datediff(d,日期字段,date())=0 then '说明是今天
if datediff(d,日期字段,date()) <0 then '说明还没到字段中的日期
if datediff(d,日期字段,date())> 0 then '说明已经过了字段中的日期

如果是sqlserver就把date()改成getdate()