I'm trying to find a way to perform a series of calculations that would allow me to apportion the number of minutes existing in a time-band (e.g. 1000hrs to 1800hrs) with a given start time and an end time.
Probably best for me to illustrate:
JOB A: Start Time - 0800
JOB A: End Time - 1800
Charge Band one begins 0600 and ends 1200
Charge Band two begins 1200 and ends 1600
Charge Band three begins 1600 and ends 2200
Thus the necessary output would be that
Charge Band One - 4 Hours (240 mins)
Charge Band Two - 4 hours (240 mins)
Charge Band Three - 2 Hours (120 mins)
The example above is a simplified case, there would be a need to accomodate a change over past midnight and the output in minutes between each band would be useful and the number of charge bands is dynamic.
Has anyone seen any example code that accomplishes this above or is their a pre-defined function in MSAccess that allows for it that I have missed?
Any help appreciated...