如何按時(shí)間顯示最新標(biāo)志

字號(hào):


    <%
    mytime=rs("time") '數(shù)據(jù)庫(kù)中保存時(shí)間
    nowtime=now() '當(dāng)前時(shí)間
    if datediff("d",mytime,nowtime)<1 then
    '比較當(dāng)前時(shí)間和數(shù)據(jù)庫(kù)中時(shí)間,如相差小于1,即顯示圖片new.gif
    %>
    <img src="images/new.gif">
    <%end if%>