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

如何让日期延迟呢?
我们发布新闻动态时是以发布新闻的日期来确定这条新闻是否是最新的.
如:  
<%if   rs( "time ")=date()   then%>
<img   src= "images/new.gif "   width= "25 "   height= "10 ">
<%end   if%>

这条新闻只要过了今天那个最新的标志就会没了,那如果我想让这条新闻再延迟几天,或者一个星期呢?请哪位高手指点一下,谢谢..

------解决方案--------------------
<%if rs( "time ")> date()-7 then%>
------解决方案--------------------
<%if datediff( "d ",rs( "time "),date()) <7 then%>
<img src= "images/new.gif " width= "25 " height= "10 ">
<%end if%>
--------------------------------------------
用datediff函数即可。
------解决方案--------------------
<%if cdate(rs( "time "))> date()-7 then%>
<img src= "images/new.gif " width= "25 " height= "10 ">
<%end if%>