D
DubboPete
Hello all,
I have a table which contains bookings for vehicles, based on the
start date/end date (date and time) per booking, and whether it spans
one day, two days or more.
I am trying to calculate the exact number of "networkdays" the vehicle
is used, but I have hit a brick wall because of the following
challenges.
Take ABC123 as the vehicle registration plate in question:
On Monday March1st it is booked out for three hours from 9am to 12
noon.
On Monday March 1st, it is then booked out from 1pm, on an extended
overnight trip to return Wednesday 3rd March at 2pm.
On Wednesday March 3rd, the vehicle is then booked out at 3pm to 5pm.
These bookings equal three separate entries in my table. In their
respective order, they are booked out for 1 networkday, and 3
networkdays, and 1 networkday, or that's how it appears in the table!
Although the bookings only span three actual networkdays (Monday,
Tuesday and Wednesday), the entries add up to 5 networkdays!
Anyone got any clues how I can work this out to three, instead of
five?
Fields in question would be :
Registration (text)
Actual_Start (Date/time, general format)
Actual_end (Date/time, general format)
Networkdays (number)
Oh, and the working hours are from 8am to 5pm per day Monday to
Friday, just in case that's needed!
Thanks in anticipation everyone
Pete
I have a table which contains bookings for vehicles, based on the
start date/end date (date and time) per booking, and whether it spans
one day, two days or more.
I am trying to calculate the exact number of "networkdays" the vehicle
is used, but I have hit a brick wall because of the following
challenges.
Take ABC123 as the vehicle registration plate in question:
On Monday March1st it is booked out for three hours from 9am to 12
noon.
On Monday March 1st, it is then booked out from 1pm, on an extended
overnight trip to return Wednesday 3rd March at 2pm.
On Wednesday March 3rd, the vehicle is then booked out at 3pm to 5pm.
These bookings equal three separate entries in my table. In their
respective order, they are booked out for 1 networkday, and 3
networkdays, and 1 networkday, or that's how it appears in the table!
Although the bookings only span three actual networkdays (Monday,
Tuesday and Wednesday), the entries add up to 5 networkdays!
Anyone got any clues how I can work this out to three, instead of
five?
Fields in question would be :
Registration (text)
Actual_Start (Date/time, general format)
Actual_end (Date/time, general format)
Networkdays (number)
Oh, and the working hours are from 8am to 5pm per day Monday to
Friday, just in case that's needed!
Thanks in anticipation everyone
Pete