DB2 Scalar functions - DAYS_TO_END_OF_MONTH
The DAYS_TO_END_OF_MONTH function returns the number of days to the end of the month.
The schema is SYSIBM.
The result of the function is INTEGER. If the argument can be null, the result can be null; if the argument is null, the result is the null value.
SET :NUMDAYS = DAYS_TO_END_OF_MONTH(DATE '2012-02-20')
SET :NUMDAYS = DAYS(LAST_DAY(date '2013-02-20')) - DAYS(date '2013-02-20') SET :NUMDAYS = DAYS_TO_END_OF_MONTH(DATE '2013-02-20')