|
-
Jan 15th, 2005, 05:47 AM
#1
Thread Starter
Hyperactive Member
Calculate time difference
Dear friends
I want to calculate difference b/w two times:
Thanks
-
Jan 15th, 2005, 06:36 AM
#2
Re: Calculate time difference
 Originally Posted by zubairkhan
Dear friends
I want to calculate difference b/w two times:
Thanks
Please where possible allways search the forums 
This should help you out,
http://www.vbforums.com/showthread.p...light=datediff
If not post back
-
Jan 15th, 2005, 06:38 AM
#3
Re: Calculate time difference
use the DateDiff function
elapsedminutes =DateDiff("n",time1,time2)
rgds pete
-
Jan 15th, 2005, 06:47 AM
#4
Thread Starter
Hyperactive Member
Re: Calculate time difference
with datediff function the output comes on the basis of 10 base
suppose i have first time is 9:55 and second time is 8:15, datediff function returns 620 , divide it by 60 = 10.33, which is wrong ansower should be 10:40
-
Jan 15th, 2005, 07:37 AM
#5
Re: Calculate time difference
with datediff function the output comes on the basis of 10 base
suppose i have first time is 9:55 and second time is 8:15, datediff function returns 620 , divide it by 60 = 10.33, which is wrong ansower should be 10:40
of course it is the correct answer for what you did. the answer is actually 10 hrs 20 mins,
the calculation to get this is:-
VB Code:
dd = DateDiff("n", "9:55", "20:15")
dd = dd \ 60 & ":" & dd Mod 60
rgds pete
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
|