system
December 27, 2010, 3:24pm
1
I am trying to calculate no of working days between the satrt date and end date using this formula but i am not getting the expected data
(Truncate(DaysBetween([start date]; [end date]) / 7 ; 0) * 5)
+ ToNumber(Substr("1234555123444512333451222345111234500123450123455"; ((DayNumberOfWeek([start date])-1)*7)
+Mod(DaysBetween([start date];[end date]);7)+1 ; 1))
pathu (BOB member since 2010-08-05)
system
December 27, 2010, 3:28pm
2
What’s that?
Marfi (BOB member since 2006-12-18)
system
December 27, 2010, 3:41pm
3
And again does this also capture the holidays? It’s better to have a calendar table with a flag that is set up to indicate the business days.
Jansi (BOB member since 2008-05-12)
system
December 27, 2010, 4:27pm
4
I dont about that number . i just used it blindly as a formula.
I dont have a cal table in the database and they cannot add also it seems.
pathu (BOB member since 2010-08-05)
system
December 27, 2010, 6:12pm
5
system
December 28, 2010, 4:33am
6
Go through that blogs
If you are using XI R2 the formula won’t work perfectly.
last section of the blog :
Help Text Bug
As an aside, the help text for the DayNumberOfWeek() function in XIR2 is incorrect. It states:
Web Intelligence always treats Sunday as the first day of the week
Based on my testing this is incorrect. Sunday is always day 7, and Monday is always day 1. This factors into the math used in this post. If that ever changes, the formulas provided in this post will no longer work.
av_deepu (BOB member since 2010-08-11)
system
December 28, 2010, 7:08pm
7
This post may help:
I am using Business Object desktop intelligence and trying to come up with a formula to count days in between two date fields. I have two date fields say start date and end date.I need to find out the days between these two dates excluding Weekends(saturday and sunday’s). The current BO universe doens’t have a calendar table and I don’t have the rights to create a table. How can I accomplish at the report level?? Any help would be appreciated.
Thanks.
boboleft (BOB member since 2010-07-16…
(See bottom of thread)
David P. (BOB member since 2010-11-09)