Subject Re: [firebird-support] DATEADD doesn't work with WEEK
Author Richard Wesley
On 18 Nov 2008, at 07:26, skoczian wrote:

> The following is taken straight from the Firebird Book, Supplement 2,
> Appendix I Function Summary, p. 249:
>
> SQL> SELECT DATEADD(WEEK, 1, DATE 'YESTERDAY') FROM RDB$DATABASE;;
>
> Result (in ISQL, Firebird 2.1, Windows XP):
>
> DATEADD
> ===========
> Statement failed, SQLCODE = -833
> expression evaluation not supported
>
> DAY, MONTH, YEAR work as expected. And in the notes for the DATEADD
> function WEEK is missing. So I'm not quite sure if it really should
> work.


Don't think it does. We have

DATEADD(DAY, %2*7, CAST(%3 AS TIMESTAMP))

in our code for FB 2.1.

HTH
________________________________________________________
Richard Wesley Senior Software Developer Tableau
Software
Visit: http://www.trytableau.com/now.html