ASP中使用DateDiff函数对比时间、日期
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 %> |
» ASP中使用DateDiff函数对比时间、日期