菜鸟ASP的问题,来个高手帮看下

来源:百度知道 编辑:UC知道 时间:2024/05/30 16:11:21
想做一个自动添加 NEW 图片的代码,ACCESS数据库时间的字段是time1,默认值是NOW(),哪位大侠帮我做一个判断,<%=rs("biaoti")%>插入以后自动出现NEW的图片,15天以后自动消失,谢谢
weoer - 助理 二级 谢谢您的回答,可惜不对

<%=rs("biaoti")%>
<%if datediff("d",rs("time1"),now)<15 then%>
<img src="你的图片地址" >
<%end if%>

在<%=rs("biaoti")%>后加上以下代码:
<%if datediff('d',time1,now())<=15 then%>
NEW图片地址
<%end if%>