Calculating Specific Dates

Use these formulas to calculate specific dates. The output type for each of these formulas is DATE:

First Day of This Month

Use this formula to get the first day of the month:

            TRUNC(LAST_DAY(CURRENT_DATE)-1, 'MONTH') 

          

Last Day of This Month

Use this formula to get the last day of the month:

            LAST_DAY(CURRENT_DATE) 

          

First Day of Last Month

Use this formula to get the first day of the last month:

            TRUNC(LAST_DAY(ADD_MONTHS(CURRENT_DATE,-1)), 'MONTH') 

          

Last Day of Last Month

Use this formula to get the last day of the last month:

            LAST_DAY(ADD_MONTHS(CURRENT_DATE,-1)) 

          

Related Topics

General Notices