LAST_DAY function in Oracle

LAST_DAY is one of the vital Date/Time functions of Oracle. It is used to get the last day of the month. The LAST_DAY function is supported in the various versions of the Oracle/PLSQL, including, Oracle 12c, Oracle 11g, Oracle 10g, Oracle 9i and Oracle 8i.

Syntax:

LAST_DAY ( date )

Parameters:
date: It is used to specify the date to be used for evaluation.

Example:

LAST_DAY ( TO_DATE ('2019/06/26', 'yyyy/mm/dd')

Output:

Jun 30, 2019

Explanation:
The last day for the month of June in the year 2019 is the 30th of June.