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
- Advanced Sample Formula Fields
- Calculating Duration Values with TO_NUMBER and TO_NCHAR
- Combining CONCAT and other Functions to Calculate String Values
- Casting Field Values using TO_NUMBER and TO_NCHAR
- Currency Consolidation and Conversion Using Custom Formula Fields
- Conditional Evaluations Using CASE WHEN
- Calculating Amounts for Relative Date Ranges