ASP中使用DateDiff函数对比时间、日期

1 2 3 4 5 6 7 8 9 10 11 12 13 <% ‘用cdate函数转换为日期类型 a= cdate(“2018-11-22 18:3…

1
2
3
4
5
6
7
8
9
10
11
12
13
<%
‘用cdate函数转换为日期类型
a= cdate(“2018-11-22 18:30:00”)
b= now()
c= datediff(“s”,a,b)
if c> 0 then
response.write(“b时间晚于a时间”)
elseif c = 0 then
response.write(“a时间和b时间为同一时刻”)
else
response.write(“a时间晚于b时间”)
end if
%>
本文来自网络,不代表24小时课堂在线立场,转载请注明出处:https://www.24ketang.cn/2733.html

为您推荐

返回顶部