Subject Re: [ib-support] Re: Is this a firebird bug ?
Author Carlos H. Cantu
The result of DATE operations (-) is number of days in the interval, I
do it all the time, with dialect 3.


WarmBoot Informatica -
FireBase - (Firebird/Interbase HQ)

AVN> --- In, "Carlos H. Cantu" <warmbooter@w...>
AVN> wrote:
>> One more info :
>> If I replace
>> where (p.brinco = :Brinco) and (( - :dNasc) <= 20)
>> with the equivalent
>> where (p.brinco = :Brinco) and ( <= (:dNasc+20))
>> it does not raise the error, so I think this is really a FB bug.

AVN> Carlos, can't surely say is it bug or feature (you know, I use
AVN> dialect 1 ;)), but in dialect 3 you can't perform arithmetic
AVN> operations when both operands are dates. In dialect 1 you can, result
AVN> is interpreted as double, but in 3, where Date is based on integer -
AVN> not. Sense of result of such operation is time interval, not a date,
AVN> and in FB there is not such datatype (Oracle have this). Why was made
AVN> decision not to interprete this result as integer, I don't know. BTW,
AVN> even in dialect 1 you can't make Date1+Date2 (and that is
AVN> understandable - what is the sence of result?), only Date1-Date2. So,
AVN> if you'll proceed discussion in firebird-devel, you can ask directly
AVN> why they don't want to interprete time interval accordingly basic
AVN> datatype.

AVN> Best regards, Alexander V.Nevsky.

AVN> To unsubscribe from this group, send an email to:

AVN> Your use of Yahoo! Groups is subject to