cancel
Showing results for 
Search instead for 
Did you mean: 

How to calculate the number of BUSINESS days between two dates

Former Member
0 Kudos

I have two dates in my data: Start Date and End Date.

I would like to create a formula in Webi that calculates the number of business days (M-F) between these two dates.

Any help would be greatly appreciated. Thanks!

Accepted Solutions (1)

Accepted Solutions (1)

amitrathi239
Active Contributor
0 Kudos

try this.

=Floor((DaysBetween([Start Date];[End Date]))-Truncate((DayNumberOfWeek([Start Date])+DaysBetween([Start Date];[End Date])) /7 ;0)*2)+1

also check this.

http://www.dagira.com/2009/10/23/calculating-business-days-between-two-days-via-report-functions/

Answers (3)

Answers (3)

Former Member
0 Kudos

That worked!

Can you help me understand what is happening in this formula so that I can manipulate it for other reports if needed?

amitrathi239
Active Contributor
0 Kudos

check attached link.it's well explained.

http://www.forumtopics.com/busobj/viewtopic.php?t=124095

Former Member
0 Kudos

It appears to be counting the weekend days still...

My dates are set like 1/1/2016, etc. There is no mention of Saturday or Sunday in the data

amitrathi239
Active Contributor
0 Kudos

use this formula.

=DaysBetween([Start Date] Where (Not(DayName([Start Date]) InList("Saturday";"Sunday")));[End Date] Where (Not(DayName([End Date]) InList("Saturday";"Sunday"))))