How do i find the time difference?

hi

Dim TimeDiff As String

Dim tempdoc As notesdocument

Set tempdoc=db.createdocument

Dim  CurrentDateTime As New NotesDateTime(tempdoc.created)

Dim docdt As New NotesDateTime(temp) 	TimeDiff=Cint(CurrentDateTime.TimeDifference(docdt)/86400)

Msgbox("Time Diff : "& Cstr(TimeDiff) &" ")

its giving me days diffence.to find the time diff what shall i do?

thanks

Sanjay

Subject: How do i find the time difference?

Dividing the result of the Timedifference by 86400 (the number of seconds in a day) will give you the number of days.

Try dividing the result by 3600 will give you the number of hours. The remainder or modulo of will be the seconds.

Subject: How do i find the time difference?

This may help

	difference = CurrentDateTime.TimeDifference(docdt)



hours = (difference - (difference Mod 3600)) / 3600

minutes = ((difference Mod 3600) - ((difference Mod 3600) Mod 60)) / 60

seconds = (((difference Mod 3600) - ((difference Mod 3600) Mod 60)) / 60) / 60