should it not be something like:
where totalDaysTimeSpan is the endDate - startDateCode:int numberOfDaysInWeek = 7; int numberOfDaysInWeekend = 2; int totalWeekendDays = totalDaysTimeSpan * numberOfDaysInWeekend / numberOfDaysInWeek;
don't think that'll work as you could be staying for say 4 days, (Thursday - Monday) and it would calculate that as 1, where it should be 2 (sat + sun)





any chance of a regain? 
Reply With Quote