View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Patrick Molloy[_2_] Patrick Molloy[_2_] is offline
external usenet poster
 
Posts: 1,298
Default add/subtracting date:time in Excel 2000

dates are saved in Excel internally as 'Long' - with the value being the
number of days from 30/12/1899 to the date used. Time is saved internally as
the decimal part of a day..thus Date/ime is 'Double' This means that 12 noon
os 0.5, 9pm is 0.75

The net of it is that to get the difference in days/time, all one has to do
is subtract on date from another and format it correctly.

A1 31/5/2005 4:00
A2 17/9/2003 17:00
A3 = A1 - A2
621.458333 format to "0 ?/24" this becomes 621 11/24

change A2 to 17/9/2005 17:00
then A3 shows -109 13/24


HTH
"Gordon" wrote:

Looking for a way to add/subtract dates/time values. i.e. date/time
1=6/30/05 08:46:00 and date/time 2 is 6/25/05 14:53:00. Time 2 is different
from time 1 by N-Days; N-hours, N-minutes. value can be either positive or
negetive depending on dates. Once thatrvalue is calculated I want to add it
to another value. Any ideas would be appreciated
Gordon