Subject Re: [ib-support] Re: [IBO] Date Question
Author Nando Dessena
Hans,

> I found a solution, maybe not the best, but it seems to work :)
>
> PROCEDURE THIS_DAY_NEXT_YEAR (CURDATE DATE)
> RETURNS (NEXTDATE DATE)
> AS
> DECLARE VARIABLE YY INTEGER;
> DECLARE VARIABLE MM INTEGER;
> DECLARE VARIABLE DD INTEGER;
> BEGIN
> YY = Extract(Year from CURDATE);
> MM = Extract(Month from CURDATE);
> DD = Extract(Day from CURDATE);
>
> NEXTDATE = Cast(mm as char(2))
> || '/' || Cast(dd as char(2))
> || '/' || Cast(yy+1 as char(4));
>
> SUSPEND;
> END

it won't work if curdate is 02/29/2004. You should account for leap
years.
Ciao
--
____
_/\/ando