View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jerry W. Lewis Jerry W. Lewis is offline
external usenet poster
 
Posts: 837
Default Calculating the difference between hours

I don't see a question here. If you want to work with time values, the
thing to remember is that Excel date/time values are stored as formatted
numbers with the integer part representing the number of days since the
beginning of 1900, and the fractional part representing the time of day
(as a decimal fraction of 24 hours). Thus 8:30 AM is stored as
8.5/24 = 0.354166666666667

When formatted as a time, 0.354166666666667 displays as 8:30 AM. When
formatted as a date/time, it displays as 1/0/1900 8:30:00 AM. When
formatted as a number, 10/18/2004 8:30:00 AM displays as 38278.3541666667.

Thus if you want to get the difference between times, you should make
sure that the dates (if present) are appropriate. If times are input
without dates, then you won't have to worry about it unless the times
actually represent different days. Assuming that the dates are either
appropriate or irrelevant, then =(timeEnd-TimeStart)*24 formatted as a
number gives the number of hours between the two times.

Jerry

Sambusa wrote:

Hi,

Where pls !!



Waiting
SAMI