944,120 Members | Top Members by Rank

Ad:
Aug 8th, 2007
0

time difference in vb6

Expand Post »
hi,
how to get the time difference in vb6

exp;

dt1 = now() ' dt1=08/Aug/07 12:57 PM
dt2=some date n time

now i want to find the difference between these two in terms of time...
can u plz tell me how to do that
Similar Threads
Reputation Points: 10
Solved Threads: 3
Light Poster
guru511 is offline Offline
42 posts
since Jul 2007
Aug 8th, 2007
0

Re: time difference in vb6

hi,

u can find difference between date and time by using datetime function.

Try the below coding:

'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)

Regards
Shailu
Reputation Points: 34
Solved Threads: 10
Junior Poster
manoshailu is offline Offline
105 posts
since Jun 2007
Apr 4th, 2010
0
Re: time difference in vb6
thanks buddy!!! that was useful to me !!!
Reputation Points: 10
Solved Threads: 0
Newbie Poster
piyush25.2009 is offline Offline
2 posts
since Dec 2009

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Visual Basic 4 / 5 / 6 Forum Timeline: VB 6.0 with Access
Next Thread in Visual Basic 4 / 5 / 6 Forum Timeline: list box controls





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC