View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Phillips Bob Phillips is offline
external usenet poster
 
Posts: 10,593
Default How do I caculate 24 hour military times



"Epinn" wrote in message
...
Bob,

I should learn how to use Boolean instead of IF( ). Case in point

+(B21<A21)*.....

If B21 = A21, there is no way to tell if it is the next day or the same

day.
I guess depending on the user's need, one may have to change the formula

to

=B21-A21+(B21<=A21)*2400 to reflect 2400 for the lapse of one day.


The formula already has an algorithm to determine whether it goes over
midnight, that is whan the +(B21<=A21)*2400 is doing, it determines that it
goes over midnight if the end time is earlier than the start time, on the
basis that the task will not be greater than 24 hours. I suppose you could
argue he might start at 8:00 and finish at 8:00.