Subject Re: [ib-support] Extract & SP
Author Helen Borrie
At 04:03 PM 21-11-01 +0200, you wrote:
>Hi all
> I call my SP from an other SP with this statement
>"select CAOLDU from cari_ay_addupdate (:CHCARIID,:CHTARIH,:CHBORC,:CHTUTAR) into :OOLDUU;"
>I get this
>"Overflow occurred during data type conversion.
>conversion error from string "18/11/2001"."
>by the way the value that is made error is CHTARIH's value and its date datatype not string must I convert the field or change the format ?

Firebird is very fussy about the format of date literals. Only mm/dd/yyyy is recognised as a slash-separated date. In this case the overflow occurred because there are not 18 months in a year. (Actually, I don't believe there are 12 months, either, because December comes around much too fast.)

Use '' or 'dd-MMM-yyyy' (where MMM is English language month abbreviations JAN, FEB, MAR, APR, MAY, JUN, JUL, AUG, SEP, OCT, NOV, DEC) or 'yyyymmdd'.

With Dialect 3, you may find also that you need to use CAST with your date literals in some places in your procedure, to correctly cast them as DATE or TIMESTAMP.


All for Open and Open for All
InterBase Developer Initiative ยท