firstday
Declaration
date function firstday(date D)
Description
firstday sets the day of date D to 1 and sets the time to 0:0:0.
Example Stored Procedure
CREATE PROCEDURE test_firstday (d DATE)
RETURNS (result DATE) AS
BEGIN
result = firstday(d);
END!!
WISQL - calling the example stored procedure
execute procedure test_firstday ("1/2/96 1:2:3")
RESULT
====================
1-JAN-1996 00:00:00
execute procedure test_firstday ("12/21/96 11:2:3")
RESULT
====================
1-DEC-1996 00:00:00