#1   Report Post  
Posted to microsoft.public.excel.misc
TBFJ
 
Posts: n/a
Default Date Time

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   Report Post  
Posted to microsoft.public.excel.misc
Gary''s Student
 
Posts: n/a
Default Date Time

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   Report Post  
Posted to microsoft.public.excel.misc
TBFJ
 
Posts: n/a
Default Date Time

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   Report Post  
Posted to microsoft.public.excel.misc
Gary''s Student
 
Posts: n/a
Default Date Time

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Calculating Difference Between Start Date & Time And End Date & Ti Samwar Excel Discussion (Misc queries) 2 December 19th 05 12:42 PM
change date based on time kdp145 Excel Discussion (Misc queries) 7 December 14th 05 02:05 AM
How do I calculate if a date is in a certain time frame? Pe66les Excel Worksheet Functions 19 August 27th 05 11:07 PM
how do I format cells to change date and time to just date bondam Excel Discussion (Misc queries) 3 July 3rd 05 01:10 PM
Help - Information with time and date PM Excel Discussion (Misc queries) 4 January 6th 05 08:25 AM


All times are GMT +1. The time now is 02:20 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"