DB2 Scalar functions - DAYOFMONTH
The DAYOFMONTH function returns an integer between 1 and 31 that represents the day of the month.
The schema is SYSIBM.
The result of the function is an INTEGER. If the argument can be null, the result can be null; if the argument is null, the result is the null value.
Set the host variable END_DAY to the day that the WELD LINE PLANNING project is scheduled to stop, by querying the PRENDATE column of the PROJECT table.
SELECT DAYOFMONTH(PRENDATE) INTO :END_DAY FROM PROJECT WHERE PROJNAME = 'WELD LINE PLANNING'
The host variable END_DAY is set to 15.