1.

One thing you could do is checking whether a booking is already there after
it has been entered
But some programming is needed in that case.

2.
I know a lot of people are not fond of using Declare Cursor procedures, but
it might be a proper solution for your problem
This enables you to run sequentially through a table (pay attention to the
sort order, I think it should be date, car, starttime, endtime)

It will also need some programming but it is doable.

Hope this helps a little

Tony IJntema

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Claudine
Robbins
Sent: zaterdag 3 maart 2012 19:33
To: RBASE-L Mailing List
Subject: [RBASE-L] - Time Overlap

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


Reply via email to