Calculating the difference between two times

Giganews Newsgroups
Subject: Calculating the difference between two times
Posted by:  Michael McDonough (mmcdonou…@teletracking.com)
Date: Fri, 3 Oct 2003

I need to calculate the difference between two times.  I
do not have a problem when going from 12:00am to 11:59am.
I also figured out how to calculate the differnce between
12:00am to 11:59pm.  How do you calculate the difference
between two times when it goes over two days.  For
instance from 10:00am (10/03) to 1:00am (10/04).  That is
15 hours, but I cannot get that answer.  Also, the dates
are not important, I just need to be able to calculate
that as 15:00 hours.

Replies