Time Difference in VB6

jodarox's Avatar, Join Date: Nov 2007
Light Poster
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?
0
pradeep's Avatar, Join Date: Apr 2005
Team Leader
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)
0
jodarox's Avatar, Join Date: Nov 2007
Light Poster
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!
0
pradeep's Avatar, Join Date: Apr 2005
Team Leader
You'll have to manually calculates, the seconds, minutes, hours... etc like this one http://www.go4expert.com/showthread.php?t=6980