Re: time calculation
From: Doug Robbins - Word MVP (dkr_at_NOmvpsSPAM.org)
Date: 04/30/04
- Next message: Phil Weldon: "Re: How to turn off the "File System Real-time Protection" in Symantec Antivirus Corporate Edition?"
- Previous message: R: "RE: Computer Won't Stay in Stand-By Mode"
- In reply to: koko: "time calculation"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 30 Apr 2004 16:11:10 +1000
Hi Koko,
Do it like this:
Dim time1 As Date, time2 As Date, interval As Long
time1 = Format(Now, "HH:mm:ss")
MsgBox "Wait a while."
time2 = Format(Now, "HH:mm:ss")
interval = DateDiff("s", time1, time2)
MsgBox "The MessageBox was displayed from " & time1 & " until " & time2 & ".
an elapsed time of " & interval & " seconds."
-- Please post any further questions or followup to the newsgroups for the benefit of others who may be interested. Unsolicited questions forwarded directly to me will only be answered on a paid consulting basis. Hope this helps Doug Robbins - Word MVP "koko" <anonymous@discussions.microsoft.com> wrote in message news:8C806AFC-636D-4DC1-B5CF-C1C06CCACE28@microsoft.com... > hi, > could u pls help me to subtract one time value from another in visual basic? > i've tried using the datediff function but it doesn't give me the required results. > i've used the now function to generate two different system times and i want to subtract one from the other and display the time elasped. how do i go about it??
- Next message: Phil Weldon: "Re: How to turn off the "File System Real-time Protection" in Symantec Antivirus Corporate Edition?"
- Previous message: R: "RE: Computer Won't Stay in Stand-By Mode"
- In reply to: koko: "time calculation"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|