Saturday, May 5, 2018

Using LAST_DAY in PLSQL Query

https://randomsrsolutions.blogspot.com/2018/05/using-lastday-in-plsql-query.html

LAST_DAY(date): Finds the date of the last day of the month that contains date.

How to find Last Day of the Month

select
LAST_DAY('14-AUG-1947'),
LAST_DAY('14-FEB-1947'),
LAST_DAY('14-FEB-2008')
from dual;

LAST_DAY('14-AUG-1947')    LAST_DAY('14-FEB-1947')    LAST_DAY('14-FEB-2008')
           31-AUG-47                                 28-FEB-47                                 29-FEB-08

No comments:

Post a Comment

XLA to GL Link

  https://plsqlquery.blogspot.com/2025/12/xla-to-gl-link.html SELECT             acr.cash_receipt_id,             acr.receipt_number,       ...