# Formula for first day of current month

Topic Labels: Dates & Timezones
Solved
1481 1
cancel
Showing results for
Did you mean:  4 - Data Explorer

Hi everyone,

I want to create a formula that gives the first day of the current month, one that gives the last date of the current month, and one for the first day of the next month. Does anyone have suggestions?

1 Solution

Accepted Solutions  10 - Mercury

Here’s a partial solution to get you started. The easy part is getting the current month number:

`MONTH( Today() )`

You can use that month number to construct other dates via DATESTR(). Here’s the first day of this month:

`DATESTR( YEAR(Today()) & "-" & MONTH(Today()) & "-1" )`

From there you can do date adding/subtracting to get the values you need. So not using real code here, but you should be able to express something like:

``this_month_last_day = (this_month_first_day + 1_month) - 1_day``  10 - Mercury

Here’s a partial solution to get you started. The easy part is getting the current month number:

`MONTH( Today() )`

You can use that month number to construct other dates via DATESTR(). Here’s the first day of this month:

`DATESTR( YEAR(Today()) & "-" & MONTH(Today()) & "-1" )`

From there you can do date adding/subtracting to get the values you need. So not using real code here, but you should be able to express something like:

``this_month_last_day = (this_month_first_day + 1_month) - 1_day`` 