year

Declaration

integer function mer_year(date D)

Description

mer_year returns the year from date variable D as an integer. mer_year returns the actual year.

Example Stored Procedure

CREATE PROCEDURE test_year (d DATE)

RETURNS (result INTEGER) AS

BEGIN

result = mer_year(d);

END!!

WISQL - calling the example stored procedure

execute procedure test_year("1/31/96 23:10:59.999")

RESULT

===========

1996

execute procedure test_year("1/31/1995 23:10:59.999")

RESULT

===========

1995

execute procedure test_year("1/31/2009 23:10:59.999")

RESULT

===========

2009