欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

asp DateDiff實(shí)現(xiàn)文字在特定時間后消失

 更新時間:2009年07月25日 13:44:10   作者:  
在asp中實(shí)現(xiàn)文字在特定時間后消失,主要是使用DateDiff函數(shù)!
DateDiff(timeinterval,date1,date2 [, firstdayofweek [, firstweekofyear]])
// timeinterval 表示相隔時間的類型,代碼為:
  yyyy 年
  q 季
  m 月
  y 一年的日數(shù)
  d 日
  w 一周的日數(shù)
  ww 周
  h 時
  n 分鐘
  s 秒
具體例子:
復(fù)制代碼 代碼如下:

<%
d1=DateDiff("d",Now(),cdate(rs("adddate")))//從數(shù)據(jù)庫中讀取商品添加的日期
if d1>-15 then
new_text="新款"
else
new_text=""
end if
%>
//d1表示后面的時間減去前面的時間
<%=new_text%>

來自:http://blog.csdn.net/lingfeng179/archive/2009/07/25/4378828.aspx

相關(guān)文章

最新評論