Sunday, March 14, 2010

Month End Date in DB2

Very often, we need to get the end of month date.

select ((CURRENT_DATE -(DAY(CURRENT_DATE) - 1) DAYS) + 1 MONTH - 1 DAY) AS MONTH_END_DT from sysibs.sysdummy1

No comments:

Post a Comment