Skip to main content
Solved

Formula for first day of current month

  • May 19, 2021
  • 1 reply
  • 71 views

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?

Thanks in advance

Best answer by Zollie

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

1 reply

Forum|alt.badge.img+18
  • Inspiring
  • Answer
  • May 19, 2021

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