Time Difference in VB6

Light Poster
1Nov2007,12:48   #1
jodarox's Avatar
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?
Team Leader
1Nov2007,17:27   #2
pradeep's Avatar
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)
Light Poster
3Nov2007,11:49   #3
jodarox's Avatar
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!
Team Leader
3Nov2007,12:20   #4
pradeep's Avatar
You'll have to manually calculates, the seconds, minutes, hours... etc like this one http://www.go4expert.com/showthread.php?t=6980