Dear friends
I want to calculate difference b/w two times:
Thanks
Printable View
Dear friends
I want to calculate difference b/w two times:
Thanks
Please where possible allways search the forums :)Quote:
Originally Posted by zubairkhan
This should help you out,
http://www.vbforums.com/showthread.p...light=datediff
If not post back
use the DateDiff function
elapsedminutes =DateDiff("n",time1,time2)
rgds pete
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,Quote:
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
the calculation to get this is:-
rgds peteVB Code:
dd = DateDiff("n", "9:55", "20:15") dd = dd \ 60 & ":" & dd Mod 60