Oracle® OLAP DML Reference 10g Release 2 (10.2) Part Number B14346-03 |
|
|
PDF · Mobi · ePub |
The LAST_DAY function returns the last day of the month in which a particular date falls.
DATETIME
LAST_DAY(datetime-expression)
An expression that has the DATETIME data type.
Example 17-34 Calculating Remaining Days in a Month
The following statement calculates how many days remain between today's date and the end of the month.
SHOW JOINCHARS('Days left: ' LAST_DAY(SYSDATE) - SYSDATE)
When today's date is September 8, 2000, then this statement returns the following.
Days left: 22