Subject Re: [firebird-support] Time calculation, with time response
Author Helen Borrie
At 12:58 PM 10/11/2008, you wrote:
>How can I calculate this?
>
>Select
> time '15:00:0.000' - time '14:04:42.000',

this gives you a number (interval), not a time.

> cast('15:00:0.000' as time) - Cast('14:04:42.000' as time),

likewise this

> cast(3318.0000 as time),

You can't cast a number as time.

> cast(cast('15:00:0.000' as time) - Cast('14:04:42.000' as time) as time)

This gives a number as well (interval).

A TIME type is a *point in time" (time of day), not an interval of time. So your CAST here from a valid string literal ( cast('15:00:0.000' as time) ) will return a value of type TIME .

./heLen