ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   How do I add 24 hours to a date and time value formated cell? (https://www.excelbanter.com/excel-discussion-misc-queries/154970-how-do-i-add-24-hours-date-time-value-formated-cell.html)

kknight79558

How do I add 24 hours to a date and time value formated cell?
 
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!

Gary''s Student

How do I add 24 hours to a date and time value formated cell?
 
=A1+1 same format as A1
--
Gary''s Student - gsnu200738


"kknight79558" wrote:

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!


squenson via OfficeKB.com

How do I add 24 hours to a date and time value formated cell?
 
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.

kknight79558 wrote:
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!


--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...excel/200708/1


Sloth

How do I add 24 hours to a date and time value formated cell?
 
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.

"kknight79558" wrote:

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!


David Biddulph[_2_]

How do I add 24 hours to a date and time value formated cell?
 
.... 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."
--
David Biddulph

"Gary''s Student" wrote in message
...
=A1+1 same format as A1


"kknight79558" wrote:

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!





All times are GMT +1. The time now is 11:19 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com