I'm not even sure how to start this one.....

I have 2 tables. One is a table of dates and the other is a list of transactions:

Table 1:

StartDate.......EndDate
1/15/03..........1/31/03
2/1/04............2/15/03
2/16/03..........2/25/03
2/26/03..........3/4/03
3/5/03............3/25/03
3/26/03...........4/15/03

(As you can see, there is no real order to the date groupings)

Table 2:

Date.................Hours
1/17/03............4.50
1/23/03............4.25
2/20/03............1.0
2/22/03............1.5
3/6/03..............1.25
3/20/03............1.0
3/28/03............1.75
3/30/03............1.75

I need to be able to add the hours while rounding them intra-time period according to the time periods in table 1. So the total of the entire list of hours from table 2 will be 18 instead of 16.75.
(4.50+4.25=8.75 rounds to 9.0)
(1.0+1.5=2.5 rounds to 3.0)
(1.25+1.0=2.25 rounds to 2.0)
(1.75+1.75=3.50 rounds to 4.0)

I'm hoping to be able to do this on the fly rather than storing any additional information. Any ideas???

Thanks!

Norm