View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Chip Pearson Chip Pearson is offline
external usenet poster
 
Posts: 7,247
Default furmula to add hours

Dates are stored by Excel as a number with the format dddd.ttttt where dddd
is the number of days since 0-Jan-1900 and tttt is a fraction of a 24-hour
day (e.g., 6:00 = 0.25, 12:00 = 0.5, 18:00 = 0.75, etc). Thus, you need to
strip the date component off of the second datetime before adding it to the
first.

=A1+B1-INT(B1)


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting LLC
www.cpearson.com
(email on the web site)


"Stephen" wrote in message
...
I have a cell (B3) that is a date formatted as 01/01/08 0:00:00
I want a formula in another cell (D3) that takes the value of B3 and adds
time to it.

eg.

B3 - 01/01/08 00:00:00
D3 - 01/01/08 23:59:59

??