Subject Re: [firebird-support] Re: Hourly rate
Author Lester Caine
Helen Borrie wrote:

> At 10:29 AM 24/10/2005 +0100, Lester Caine wrote:
>
>>Martijn Tonies wrote:
>>
>>
>>>>I use TIME for hours and minutes and cast to TIME when I want to display
>>>>a duration as hours and minutes. Days just being multiples of 24 hours (
>>>>or what ever you want for the Martian clock ;) )
>>>
>>>But not a duration > 24 hours, I guess? As you are misusing the type... but
>>>you know it ;)
>>
>>Yes a duration > 24 hours. It may be misusing the type, but I keep
>>getting told - it's just numbers stored internally.
>>Arithmetic on dates and times works nicely with days and fractions of
>>days. better than where the times are stored as multiples of seconds :(
>
> Care to share how you load e.g. '25:56:00.0000' into a TIME type without
> getting a 335544334 error?

Tend to be working the other way. (TIMESTAMP - TIMESTAMP) -> DATE as INT
* 24 + EXTRACT HOURS from TIME and then EXTRACT MINS
But you are right - I'm thinking TIMESTAMP rather than TIME ;)

--
Lester Caine
-----------------------------
L.S.Caine Electronic Services
Treasurer - Firebird Foundation Inc.