You could do something like this:
%%[
set @twoMonthsDate = dateadd(now(), 2, "M")
set @month = DatePart(@twoMonthsDate, "M")
set @year = DatePart(@twoMonthsDate, "Y")
set @firstOfTwoMonthsDate = dateparse(concat(@month,"/01/",@year))
set @lastDayNextMonth = dateadd(@firstOfTwoMonthsDate,-1,"D")
]%%
<br>now(): %%=now()=%%
<br>@twoMonthsDate: %%=v(@twoMonthsDate)=%%
<br>@month: %%=v(@month)=%%
<br>@year: %%=v(@year)=%%
<br>@firstOfTwoMonthsDate: %%=v(@firstOfTwoMonthsDate)=%%
<br>@lastDayNextMonth: %%=v(@lastDayNextMonth)=%%
Output
now(): 5/31/2016 9:05:14 AM
@twoMonthsDate: 7/31/2016 9:05:14 AM
@month: 07
@year: 2016
@firstOfTwoMonthsDate: 7/1/2016 12:00:00 AM
@lastDayNextMonth: 6/30/2016 12:00:00 AM
A quick Google revealed this:
CASE(
MOD(TODAY() - DATE(1900, 1, 8), 7),
0, TODAY() + 7,
1, TODAY() + 6,
2, TODAY() + 5,
3, TODAY() + 4,
4, TODAY() + 3,
5, TODAY() + 2,
6, TODAY() + 1,
DATE(9999,01,01)
)
that I assume could be refactored a bit and changed for your case to:
CloseDate + CASE(
MOD(CloseDate - DATE(1900, 1, 8), 7),
0, 7,
1, 6,
2, 5,
3, 4,
4, 3,
5, 2,
6, 1,
0
)
Adding 1 to a date moves it on a day.
Best Answer
That functionality does not exist, but Salesforce is aware that people want it. Based on comments (19 days ago at the time of this post) by the SF product team, this feature may see its way into the Lightning Experience. You can vote on the idea here.
Please note that while the title mentions weeks within reporting, custom work weeks have been mentioned in other contexts in some of the ideas that have been merged into this one.