
DateDiff(計算類型,日期1,日期2)計算兩個日期之間的 差
單位是年 或月 日 時。。。由 計算類型 指定
設置 描述
yyyy 年
q 季度
m 月
y 一年的日數
d 日
w 一周的日數
ww 周
h 小時
n 分鐘
s 秒
dim nowtime,dtime,ltime
nowtime=date()
dtime=trim(request.form("dtime"))
ltime=trim(request.form("ltime"))
if DateDiff("d" , dtime , date())>0 then
response.write "<script>alert(""到達時間不能晚于當前時間!"");history.go(-1);</script>"
end if
if DateDiff("d" , dtime , ltime)<0 then
response.write "<script>alert(""離開時間不能晚于到達時間!"");history.go(-1);</script>"
end if
if DateDiff("d" , ltime , date())>0 then
response.write "<script>alert(""離開時間不能晚于當前時間!"");history.go(-1);</script>"
end if
您發布的評論即表示同意遵守以下條款:
一、不得利用本站危害國家安全、泄露國家秘密,不得侵犯國家、社會、集體和公民的合法權益;
二、不得發布國家法律、法規明令禁止的內容;互相尊重,對自己在本站的言論和行為負責;
三、本站對您所發布內容擁有處置權。