Hi

I have until now the Summation of hours calculated as
Abfrage1:

ID Date_Time_From Datum_Zeit_To ST Summe
1 05.08.2009 09:00:00 05.08.2009 11:00:00 2,00 02:00
2 06.08.2009 12:00:00 06.08.2009 13:30:00 1,50 01:30
3 07.08.2009 02:00:00 07.08.20 09 05:00:00 3,00 03:00
4 08.08.2009 22:00:00 09.08.2009 02:00:00 4,00 04:00
5 10.08.2009 23:00:00 11.08.2009 04:00:00 5,00 05:00
6 12.08.2009 23:00:00 15.08.2009 05:00:00 54,00 54:00
7 03.08.2009 09:00:00 06.08.2009 03:00:00 66,00 66:00
8 12.08.2009 09:00:00 12.08.2009 11:00:00 2,00 02:00

SQL-View:


SELECT Tabelle1.ID, Tabelle1. Date_Time_From, Tabelle1. Datum_Zeit_To, ([Datum_Zeit_To]-[ Date_Time_From])*24 AS ST, IIf([ST]<24,Format([ST]/24,"Short Time"),Format([ST]) & ":" & Format([ST],"nn")) AS Summe, *
FROM Tabelle1;



My question is:

I want the standard hours to add: (in Germany pauschal Stunden)

1-Case:
from 09:00 to 18:00 e.g. here the sum of hours
will normally add here that the sum of hours = 9 hours


2-Case:
from 18:00 to 20:00 is 50&#37; of these hours to add
, i.e. usually 18:00 to 20:00 as a result 2 hours but I would like to here as the result of 3 hours
(because the sum hours 18:00 to 20:00 = 2 hours + 50% of this 2 hours (= 1 hour) i.e. 2 hours + 1 hour = 3 hours)

as a result 18:00 to 20:00 = 03:00 (3 hours)
or 18:00 to19:00 = 02:00 (2 hours)


3 Case

from 20:00 to 09:00(Morgens) is 100% of these hours to add, ,i.e. usually20:00 to 09:00 as a result 13 hours but I would like to here as the result of 26 hours i.e. double 100%
(because the sum hours 20:00 to 09:00 = 13 hours + 100% of this 13 hours (= 13 hours) i.e. 13 hours + 13 hours = 26 hours)



as a result 20:00 to 09:00 = 26:00 (26 hours)
or 23:00 to03:00 = 08:00 (8 hours)

Thanks