Click to See Complete Forum and Search --> : Time Diff


October 26th, 1999, 11:08 AM
Please can someone tell me how to calculate the difference between two times stored in a recordset.
I do not need to calculate the difference in days or dates, i just need the difference in time.

senthil
October 26th, 1999, 12:49 PM
Do you want the difference in Hours/Minutes/Seconds?

senthil
October 26th, 1999, 12:51 PM
Use datediff function to find out the time difference

For Example:

'Difference in hours
diff = DateDiff("h", date1, date2)

'Difference in minutes
diff = DateDiff("n", date1, date2)

'Difference in Seconds
diff = DateDiff("s", date1, date2)