How do I add 24 hours to a date and time value formated cell?

G

Guest

I have a cell formatted with DD/MM/YY HH:MM in 24 hour clock and want to add
1 day or 24 hours. When I use the +time(24,0,0) function the date remains
the same and the hours are only added. How do I get it to add a day to the
date and time. I'm doing time zone convertions for 6 different world
locations.. Tks!
 
S

squenson via OfficeKB.com

In Excel a day is equal to 1, 0.5 is 12 hours and 0.3333 is 8 hours. Simply
add 1 to your cell and that's it.

Time(24,0,0) returns the time on a 24-hour clock, so it is equal to Time(0,0,
0) or 0, which means you added 0 to your cell.

Stephane Quenson.
 
G

Guest

to add 1 day to a date, just add 1 like this
=A1+1

to add hours to a date, add fractions of a day like this...
=A1+1/24
=A1+2/24
etc.

the function TIME returns the time of day so TIME(24,0,0) results in 0:00 or
0. It shouldn't have added anything at all.
 
D

David Biddulph

.... and the reason for the problem is in Excel help for the TIME() function:
"The decimal number returned by TIME is a value ranging from 0 (zero) to
0.99999999, representing the times from 0:00:00 (12:00:00 AM) to 23:59:59
(11:59:59 P.M.)."
and
"Hour is a number from 0 (zero) to 32767 representing the hour. Any value
greater than 23 will be divided by 24 and the remainder will be treated as
the hour value. For example, TIME(27,0,0) = TIME(3,0,0) = .125 or 3:00 AM."
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top