dow

Declaration

integer function dow(date D)

Description

dow returns the day of the week from date variable D as an integer. dow returns values from 1 to 7 where 1 represents Sunday..

Example Stored Procedure

CREATE PROCEDURE test_dow (d DATE)

RETURNS (result INTEGER) AS

BEGIN

result = dow(d);

END!!

WISQL - calling the example stored procedure

execute procedure test_dow("1/1/96");

RESULT

===========

2

execute procedure test_dow("1/31/96");

RESULT

===========

4