Help

Formula for first day of current month

Topic Labels: Dates & Timezones
Solved
Jump to Solution
2939 1
cancel
Showing results for 
Search instead for 
Did you mean: 
James_N
4 - Data Explorer
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?

Thanks in advance

1 Solution

Accepted Solutions
Zollie
10 - Mercury
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

See Solution in Thread

1 Reply 1
Zollie
10 - Mercury
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