The DAY function returns the day part of a value.
The result of the function is a large integer. If the argument can be null, the result can be null; if the argument is null, the result is the null value.
The other rules depend on the data type of the argument:
The result is the day part of the value, which is an integer between 1 and 31.
The result is the day part of the value, which is an integer between -99 and 99. A nonzero result has the same sign as the argument.
SELECT DAY(PRENDATE) INTO :END_DAY FROM PROJECT WHERE PROJNAME = 'WELD LINE PLANNING'Results in END_DAY being set to 15.
SELECT DAY( DATE('2000-03-15') - DATE('1999-12-31') ) FROM SYSIBM.SYSDUMMY1Results in the value 15.
(C) Copyright IBM Corporation 1992, 2006. All Rights Reserved.