Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Can Excel recognize 2400 hours as midnight today? Every formula I try forces
the date/time to show it as 1st thing tomorrow morning. ie, it adds one day to the date, when it should not do so until 0001 hours. Thanks in advance. TBF |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
That's because 2400 is the roll-over point.
In A1 thru C1 put: 2359 =TIME(A1/100,A1-100*INT(A1/100),0) =B1 and you will see: 2359 11:59 PM 0.9993055556 with the correct formatting However if you put 2400 in A1 you will see: 2400 12:00 AM 0.0000000000 with the same formatting -- Gary''s Student "TBFJ" wrote: Can Excel recognize 2400 hours as midnight today? Every formula I try forces the date/time to show it as 1st thing tomorrow morning. ie, it adds one day to the date, when it should not do so until 0001 hours. Thanks in advance. TBF |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
That is what I suspected was the "Feature" of Excel. Do you know of a way to
correct this? I am working with weather data and the data that is summerized at midnight is for the preceeding 24 hours, so should have that date on it, not the next day's. The only way I have found is to do "if time=2400 then date=date-1" but that is not really correct since that actually puts that data at the beginning of the day instead of the end of the day. Thanks for your thoughts === TBFJ "Gary''s Student" wrote: That's because 2400 is the roll-over point. In A1 thru C1 put: 2359 =TIME(A1/100,A1-100*INT(A1/100),0) =B1 and you will see: 2359 11:59 PM 0.9993055556 with the correct formatting However if you put 2400 in A1 you will see: 2400 12:00 AM 0.0000000000 with the same formatting -- Gary''s Student "TBFJ" wrote: Can Excel recognize 2400 hours as midnight today? Every formula I try forces the date/time to show it as 1st thing tomorrow morning. ie, it adds one day to the date, when it should not do so until 0001 hours. Thanks in advance. TBF |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Move it back by one minute or even 1 second (if possible)
=IF(A1=2400,2359,A1) -- Gary's Student "TBFJ" wrote: That is what I suspected was the "Feature" of Excel. Do you know of a way to correct this? I am working with weather data and the data that is summerized at midnight is for the preceeding 24 hours, so should have that date on it, not the next day's. The only way I have found is to do "if time=2400 then date=date-1" but that is not really correct since that actually puts that data at the beginning of the day instead of the end of the day. Thanks for your thoughts === TBFJ "Gary''s Student" wrote: That's because 2400 is the roll-over point. In A1 thru C1 put: 2359 =TIME(A1/100,A1-100*INT(A1/100),0) =B1 and you will see: 2359 11:59 PM 0.9993055556 with the correct formatting However if you put 2400 in A1 you will see: 2400 12:00 AM 0.0000000000 with the same formatting -- Gary''s Student "TBFJ" wrote: Can Excel recognize 2400 hours as midnight today? Every formula I try forces the date/time to show it as 1st thing tomorrow morning. ie, it adds one day to the date, when it should not do so until 0001 hours. Thanks in advance. TBF |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Calculating Difference Between Start Date & Time And End Date & Ti | Excel Discussion (Misc queries) | |||
change date based on time | Excel Discussion (Misc queries) | |||
How do I calculate if a date is in a certain time frame? | Excel Worksheet Functions | |||
how do I format cells to change date and time to just date | Excel Discussion (Misc queries) | |||
Help - Information with time and date | Excel Discussion (Misc queries) |