Expression for 1st date of next month if today is last of this month

In the following expression, if today is a weekday other than Friday, I want to provide the date for tomorrow, otherwise provide a date for 3 days from now.

The issue is, if the date is the last day of the month, a +1 will cause massive errors and stop calls from being handled.

If(DayOfWeek(AddHours(GetCurrentDateTimeUtc(),-7)) < 6,
MakeDateTime(Year(GetCurrentDateTimeUtc()), Month(GetCurrentDateTimeUtc()), Day(GetCurrentDateTimeUtc())+1, 13, 00, 00),
MakeDateTime(Year(GetCurrentDateTimeUtc()), Month(GetCurrentDateTimeUtc()), Day(GetCurrentDateTimeUtc())+3, 13, 00, 00)
)

What's the best way to get the correct first day of the next month if todays date is the last date of this month?

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.