Hello all,

I'm trying to programmatically identify overlapping hours in sets of
start/end time records for a maximum 24 hour period for vehicle usage,
something that the human eye readily sees such as:

Start           End
10:00:00        12:00:00
9:00:00 13:00:00

Where the second row overlaps the first by 2 hours (1 hour earlier and 1
hour later) so that I could visually see the allowable time segment as the
second one and disregard the first.

In the following example, however:

Start           End
10:00:00        12:00:00
08:00:00        11:00:00

I have to take the first row into account with 1 hour later end time than
the second row and 2 hours earlier than the first start time.  I can still
see that the result is allowing the end time of the first row and the start
time of the second row.

It gets complicated where there are multiple rows and partial minutes
involved thus the need to be able to calculate the total time shared by all
the rows without making the user go blind trying to visualize the
overlapping hours.  Best scenario would be to prevent the user from adding
an overlapping segment at data entry validation.  

Typical entry example:

Date            Start   End    Vehicle
01/01/12  5:00:00 11:30:00 234
01/01/12 11:30:00 18:00:00 234
01/01/12 17:30:00  0:00:00 234

Perhaps someone on the list has already tackled this problem or someone can
give me a hint in what direction to take my calculations.

Thank you very much in advance,

Claudine

--- RBASE-L
================================================
TO POST A MESSAGE TO ALL MEMBERS:
Send a plain text email to [email protected]

(Don't use any of these words as your Subject:
INTRO, SUBSCRIBE, UNSUBSCRIBE, SEARCH,
REMOVE, SUSPEND, RESUME, DIGEST, RESEND, HELP)
================================================
TO SEE MESSAGE POSTING GUIDELINES:
Send a plain text email to [email protected]
In the message SUBJECT, put just one word: INTRO
================================================
TO UNSUBSCRIBE: 
Send a plain text email to [email protected]
In the message SUBJECT, put just one word: UNSUBSCRIBE
================================================
TO SEARCH ARCHIVES:
Send a plain text email to [email protected]
In the message SUBJECT, put just one word: SEARCH-n
(where n is the number of days). In the message body, 
place any 
text to search for.
================================================


Reply via email to