View Full Version : Time within period - hourly report


cureben
01-01-2009, 01:14 PM
Hi,
I have got table contain working time e.g.

Id|Start| end |code
_______________
1|06:30|07:25|A
2|07:25|11:05|B
3|11:05|11:50|C

I would like obtain data like listed below:

period(hour) | minutes |code
------------------------------------------------
06 - 07 | 30 | NO WORK
06 - 07 | 30 | A
07 - 08 | 25 | A
07 - 08 | 35 | B
08 - 09 | 60 | B
09 - 10 | 60 | B
10 - 11 | 60 | B
11 - 12 | 5 | B
11 - 12 | 45 | C
11 - 12 | 10 | NO WORK
12 - 13 | 60 | NO WORK
13 - 14 | 60 | NO WORK


That should be reportable for each working shift 06-14, 14-22, 22-06 or
range of time for example 07-18

I have not any idea how to do that.
That is obtainable by query?
Or maybe I should use VB?

Thanks for any suggestion
'----
cureben

HiTechCoach
01-01-2009, 02:51 PM
Take a look at the Partition() function. Maybe it will help.

cureben
01-02-2009, 01:57 PM
Hi HitechCoach

Take a look at the Partition() function. Maybe it will help.

I tried use this function
but I had only 'error' in results.

This function working with date?
Could you give me any sample with date?


regards
thx

cureben