Go4Expert

Go4Expert (http://www.go4expert.com/)
-   Visual Basic ( VB ) (http://www.go4expert.com/forums/visual-basic/)
-   -   Time Difference in VB6 (http://www.go4expert.com/forums/time-difference-vb6-t7142/)

jodarox 1Nov2007 12:48

Time Difference in VB6
 
Hi everyone! I am just a new registrant to this site and maybe I have more fun to this I have a question about calculating times between times in VB6 is there anyone knows the code? :D

pradeep 1Nov2007 17:27

Re: Time Difference in VB6
 
Code: VB

'To find Days
DateTime.DateDiff("d",Text1.Text,now)

'To find Months
DateTime.DateDiff("m",Text1.Text,now)

'To find Years
DateTime.DateDiff("y",Text1.Text,now)

'To find Hours
DateTime.DateDiff("h",Text1.Text,now)

'To find Minutes
DateTime.DateDiff("n",Text1.Text,now)

'To find Seconds
DateTime.DateDiff("s",Text1.Text,now)


jodarox 3Nov2007 11:49

Re: Time Difference in VB6
 
Thanks for replying me so soon I'm very glad about that. the problem for that code is in seconds its accumulated and not restting into 60 seconds only is ther any other way in calcutlating time difference? Thank in advance I appreciated most your soonest response.
Regards to all! ;)

pradeep 3Nov2007 12:20

Re: Time Difference in VB6
 
You'll have to manually calculates, the seconds, minutes, hours... etc like this one http://www.go4expert.com/showthread.php?t=6980


All times are GMT +5.5. The time now is 20:07.