Beginning of the month formula

Coda has native EndOfMonth() formula.

Am I correct that there is no native formula for the beginning of the month?

Then what’s the best formula to calculate the beginning of the month?

I came up with this one (if I want to calculate the beginning of the current month):
EndOfMonth(Today(), -1) + Days(1)

Is there a better and shorter way to calculate it?

P.S. I think BeginningOfMonth() would be a good addition to Coda formulas.
Useful for calculation of sums/averages etc for specific months.

2 Likes

Hi @Andrei_Kharlanov,
Another way could be
Date(Today().Year(), Today().Month(),1)
It’s just the first one that comes to my mind, but I’m sure there are others.

The main issue the EndOfMonth() is addressing is the variable number of days in months (and this is why I’m supporting the International Fixed Calendar :smiley:).

BeginningOfMonth() would be a shortcut for an always known date - nonetheless useful: so I second your request.

Until we’ll have the Fixed Calendar!

3 Likes

Thanks, @Federico_Stefanato, that’s easier to understand in a long formula than EndOfMonth(Today(), -1) + Days(1)!

Can we get on option in Coda to start weeks on Mondays and option to configure the default date format as dd-mm-yyyy before that, please? :laughing:

1 Like

Well, as Coda is gaining more and more momentum globally, this is a request that is getting higher pressure (you might see many posts in the last months about this).
I think it’s quite high in their priorities, although I guess that there are some consistency implications in the implementation.
Let’s bear the wait and be ready to mark all the workarounds once available :wink:

1 Like

Dear @Federico_Stefanato and @Andrei_Kharlanov,

This post is related to the to the first day of the month and might be of interest of you and others

2 Likes

Thanks, @Jean_Pierre_Traets!

The formula used in that post (using Today as example) is:
Today() - Today().Day() + 1

So we’re taking the date, subtracting day-of-month number for that day and adding one more day.

I don’t know what’s faster for Coda to calculate, but
Date(Today().Year(), Today().Month(), 1) is easier for me to read.
And both are not ideal in my mind.

P.S. Coda team, please bring BeginningOfMonth() formula to life when you finish all other issues in your backlog :stuck_out_tongue_closed_eyes:

3 Likes