Formulas: EndOfMonth() and RelativeDate()
Category: Dates/Times
EndOfMonth()
Returns the last day of a chosen month
or stated otherwise...
Hey Coda, can you tell me the last day of this month?
RelativeDate()
Adds a chosen amount of months to a date
put a bit simpler...
Hey Coda, can you to add some months to this date?
EndOfMonth() and RelativeDate() both have two parameters; one is shared and one differs.
EndOfMonth()
DateTime
EndOfMonth(DateTime, MonthOffSet)
The specific date from which you want to extract a day, month, or year.
MonthOffSet
EndOfMonth(DateTime, MonthOffSet)
The number of months to move forwards or backwards. 0 is month of DateTime.
RelativeDate()
DateTime
RelativeDate(DateTime, Months)
The specific date from which you want to extract a day, month, or year.
Months
RelativeDate(DateTime, Months)
The number of months to add, which can be negative.
EndOfMonth
Dates can be particularly hard to deal with (no thanks to February). The last day of each month is often different but can easily be found via EndOfMonth() — Try the controls below to find the end of each month this year or use the MonthOffset parameter to skip forward a few months.
The last day of is which falls on a .
But after-all I don’t care about - I really want to skip forward months from then to find that the end of is .
RelativeDate
Relative Dates allow us to easily move forward a date by exactly one month with . Change the date control below to the last day of October to see what happens. Choose a date →
The day of my chosen month is: The day of one month later is: Business Quarters
Business cycles often fall in quarters—or 3 month periods of time. If you work in a business with OKR’s you know all too well what I’m talking about.
Use the two buttons below to automatically change the start/end of a quarter and view the holidays that fall within. The buttons are using the formula and RelativeDate() and EndOfMonth() to quickly set these controls.
Quarter Cycler
Want more formulas | Ready to master Coda yourself?