cancel
Showing results for 
Search instead for 
Did you mean: 

Calculate X business day of the month

0 Kudos

I need to calculate 7 business days before the end of the month.. how to count 7 days without including Sat/Sundays?

example.. October would be 10/23

thanks!

Accepted Solutions (1)

Accepted Solutions (1)

ayman_salem
Active Contributor

or as follow:

CurDate: =CurrentDate()

lastDayOfMonth: =LastDayOfMonth([CurDate])

DayNrOfWeek: =DayNumberOfWeek([lastDayOfMonth])

DateX: =(7+[DayNrOfWeek]-2)

DDD: =RelativeDate([lastDayOfMonth];-[DateX]+1)

saurabh_sonawane
Active Contributor
0 Kudos

Hi this formula will fail when the end date will come on Sunday or Saturday plz check.

Plz validate the logic for Saturday and Sunday.

Thanks.

Answers (2)

Answers (2)

0 Kudos

I like both answers! lol flipping coin for the winner...


GG Ayman! lol

saurabh_sonawane
Active Contributor
0 Kudos

Hi Geoff

the above correct answer logic fails for Monday also.

I had tested for sep month

saurabh_sonawane
Active Contributor
0 Kudos

Hi,

Hope this formula will help you

=If(DayNumberOfWeek(LastDayOfMonth(CurrentDate())) InList(1;7);RelativeDate(LastDayOfMonth(CurrentDate());-10);If(DayNumberOfWeek(LastDayOfMonth(CurrentDate()))=6;RelativeDate(LastDayOfMonth(CurrentDate());-9) ;RelativeDate(LastDayOfMonth(CurrentDate());-8)))

Thanks,