|
-
Dec 12th, 2000, 05:00 PM
#1
Thread Starter
Member
how would you (in vbscript) compare times like this:
if (time1 - time2) > 60minutes then
code code code code code code code
end if
so basically i want to do something only if the 2 times are less then 1 hour apart.
thanks in advance for any help.
-
Dec 12th, 2000, 05:25 PM
#2
You could use the DateDiff() function with a minutes ("n") interval like so:
Code:
If DateDiff("n", datetime1, datetime2) < 60 Then
' Do your code here.
End if
Paul
PS - Edited to change 'minuetes' to 'minutes' - geez. :P
[Edited by PWNettle on 12-12-2000 at 06:08 PM]
-
Dec 12th, 2000, 06:04 PM
#3
Thread Starter
Member
thanks! worked perfectly!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|