how to find number of days between in particualr period

hi,

I have small issue, i have two dates, “starting” and “ending” date so i need calculate number of days between these starting and ending dates without includes Saturday and Sunday.
i have “day” object means sunday,monday…like and year,month,week objects also there.
Please help me!
i want this in report level. Starting and ending dates are my prompts and objects also.

ex: starting date is 01/01/2008
ending date is 01/08/2008
i used daysbetween(starting date;ending date) but how to eliminate saturdays and sundays.
iam using webi


srinu.bos (BOB member since 2007-06-06)

What database are you connected to?

Depending on the database theres probably a bunch of functions you could use in your Universe.

Other than that youd have to write a formula to loop round each day in the date range and check whether its a weekend. Given that Webi doesnt support control structures like loops youd have to do it in the database in a user defined function.

Unless someone else knows of a built in Webi function that does it.


ABILtd :uk: (BOB member since 2006-02-08)

thanks for ur response,

iam using sql2000 server.
please try any chance is there in report level or universe level to find this solution.


srinu.bos (BOB member since 2007-06-06)

Try this clever Deski example and see if you can translate it to work in Webi:-

https://bobj-board.org/t/73436


Mak 1 :uk: (BOB member since 2005-01-06)

:? hummm… interesting problem !

Don’t you think you can’t resolve this by a crazy smart calculation ??
each 7 days you have a saturday and a sunday and you know the starting day (monday, tuesday, etc…) and the same thing for ending…

cheers :wink:


kenny :fr: (BOB member since 2007-01-02)

I want to move this topic to the correct sub-forum of “Building Reports”. Since you don’t say what version you are using, I’m taking a guess and moving it to WebI XI. If I guessed incorrectly, use Report-A-Post (Red Exclamation Point icon) to request it to be moved again.


Anita Craig :us: (BOB member since 2002-06-17)

This post may help:


David P. :us: (BOB member since 2010-11-09)