0

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

5
Contributors
4
Replies
26
Views
11 Years
Discussion Span
Last Post by rishif2
0

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

0

how to get datetime function ??

for this , you should create a new thread with appropriate title.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.