Subject | Re: [firebird-support] Adding time to date |
---|---|
Author | Raigo |
Post date | 2004-09-17T09:57:04Z |
I am glad to read, that you have similar application.
I just wondered if you have to separate those hours somehow by time? For
example I have to show how many of those hours was between 6-18 (daily
fee), 18-22 (evening fee), 22-6 (nightly fee). Result would be something
like this
16.09.2004 16:00-24:00 (total 8 hours; daily 2 hours(16-18); evening 4 hours(18-22), nightly 2 hours(22-24)).
How to best calculate this in SQL?
Raigo
Planles wrote:
I just wondered if you have to separate those hours somehow by time? For
example I have to show how many of those hours was between 6-18 (daily
fee), 18-22 (evening fee), 22-6 (nightly fee). Result would be something
like this
16.09.2004 16:00-24:00 (total 8 hours; daily 2 hours(16-18); evening 4 hours(18-22), nightly 2 hours(22-24)).
How to best calculate this in SQL?
Raigo
Planles wrote:
>>What I need to do is system for employee worktime management.
>>BEGINNING is date+time of starting and END is date+time of ending. Trick
>>is that workday can end on next date. This system is going to be used in
>>factory what has workshifts (daily, nightly etc.). Work can begin on
>>evening and end in morning. I need to be able to generate reports from
>>that how many hours someone worked on certain date. For example
>>16.09.2004 19:00-24:00 (5 hours)
>>17.09.2004 00:00-06:00 (6 hours)
>>
>>
>
>I'm working on similar application, and I ran into same problem.
>I think there is NO possibillity to write time as 24:00, but the max value
>is 23:59:59,999.
>
>I was already considering storing time in houndreds format as float value
>(8:30 as 8,50).
>
>I would apprechiate if anybody else can share expirience on that.
>
>Regards,
>Primoz
>
>