Subject Re: [ib-support] Stored Procedure Question Again (NewBie)
Author Lucas Franzen
> I have a procedure that I get a Date paramater and I have separate the year and month from the day and write to a table. I try to find a function for the pupose and I find extract,year and month functions but only names. There was no using example or any explanation for them in the LangRef.pdf, that I downloaded from borland's web site.

example for a procedure that extracts day, month and year from a given
date:

CREATE PROCEDURE SP_DMY ( ADATE DATE )
RETURNS (
ADAY INTEGER,
AMONTH INTEGER,
AYEAR INTEGER
)
as
begin
ADAY = EXTRACT ( DAY FROM :ADATE );
AMONTH = EXTRACT ( MONTH FROM :ADATE );
AYEAR = EXTRACT ( YEAR FROM :ADATE );

SUSPEND;
end

HTH

Luc.