Skip to content

LAST_DAY

  • date: This parameter represents the date for which the function will find the last day of the month. It should be a DATE or an expression that can be evaluated to a DATE.
SELECT LAST_DAY(TO_DATE('2022-01-01', 'YYYY-MM-DD')) AS Last_Day FROM dual;
LAST_DAY
2022-01-31

The LAST_DAY function returns the last day of the month for the provided date. In the example, the date ‘2022-01-01’ is provided, and the function returns ‘2022-01-31’, which is the last day of January.