Subject | RE: [firebird-support] adding one year to date |
---|---|
Author | Alan McDonald |
Post date | 2004-04-28T12:33:37Z |
> CREATE PROCEDURE IS_LEAPYEAR (You need to SUSPEND after assigning your return values.
> D TIMESTAMP
> ) RETURNS (
> LY INTEGER
> ) AS
> BEGIN
> IF ( 2 = EXTRACT(MONTH FROM (D - EXTRACT(YEARDAY FROM D) + 59)) ) THEN
> LY = 1; /* leap year */
> ELSE
> LY = 0; /* normal year */
> END
>
>
> but when I try:
> SELECT * FROM IS_LEAPYEAR('27.04.2003');
>
> returned is 'null'.
>
> any ideas?
Alan