cancel
Showing results for 
Search instead for 
Did you mean: 

How to find number of days between two given dates

Former Member
0 Kudos

Hi Gurus,

I have requirement to calculate number of days between two given days( Start date and End Date). I know Daysbetween function will do this. But the issue is when we are finding the difference we need to consider holidays.

For Ex. Jan 14 th is friday that is my start date and he completed his work on Jan 17(End date) that is Monday, so three days between 14 and 17, but that is not correct in terms of business since i need to ignore holidays between these two dates, so number of days between these two dates are 1 not 3.

Any ideas!

Thanks,

-B-

View Entire Topic
Former Member
0 Kudos

hi ravikumar

create two variables in webi

fromdate=UserResponse("fromdata");

todate=UserResponse("todate");

between=DaysBetween(ToDate([fromdate];"");ToDate([todate];""))

regards

bharath

0 Kudos

Hi,

I have bo webi report and need to calculate a new Date for every rows according to value date

e.G

"Value Date"     + 4 Workday  "NewDate"

20.05.2016                              26.05.2016           

Can you help me please..

Former Member
0 Kudos

Hi,

You need first to create a variable to determine the number of days to add to have 4 work days.

Create the variable "Nb Days to Add" with the following formula:

=(If DayName(RelativeDate([Value Date];1)) InList("Saturday";"Sunday") Then 2 Else 1) +

(If DayName(RelativeDate([Value Date];2)) InList("Saturday";"Sunday") Then 2 Else 1) +

(If DayName(RelativeDate([Value Date];3)) InList("Saturday";"Sunday") Then 2 Else 1) +

(If DayName(RelativeDate([Value Date];4)) InList("Saturday";"Sunday") Then 2 Else 1)

Then create the variable "NewDate" with the following formula:

=RelativeDate([Value Date];[Nb Days to Add])

Didier