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
Deleted Row
is
which falls on a
.
But after-all I don’t care about
- I really want to skip forward
00
2
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
one exception
. Change the date control below to the last day of October to see what happens.
Choose a date →
10/25/2022
One month later is:
11/25/2022
One year later is:
10/25/2023
The day of my chosen month is:
25
The day of one month later is:
25
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
Start:
Oct 1, 2022
End:
Dec 31, 2022
Advance Quarter
11/11/2022
Veterans Day
11/26/2022
Thanksgiving Day
12/25/2022
Christmas Day
Practice: Find the end of a month and the end of the month after
Done
Find people’s birthday for the current year
Done
Create Quick-Set buttons that move a controls forward and backwards by exactly 1 month
Done
Want more formulas | Ready to master Coda yourself?