如何使用vbscript确定是否在3.5分钟后?

时间:2011-07-27 17:30:17

标签: datetime vbscript

如何使用vbscript确定它是否在3.5分钟后?

<%On Error Goto 0

Dim timer, timeNow, timeStart

timeStart = Request.Cookies("timeStart")
'timeNow = time()

If Trim(timeStart) = "" Then
Response.Cookies("timeStart") = Now()
End If

Response.Write "timeStart: " & timeStart    

' if it is past 3 1/2 minutes later
If Now() > timeStart Then
%>
<!-- 'call javascript function? -->
Call Javascript Exit Survey
<%
End If
%>

2 个答案:

答案 0 :(得分:0)

使用:

DateDiff("n",fromDate,toDate,vbMonday)

答案 1 :(得分:0)

If Now() > DateAdd("s", 210, timeStart) Then