I am currently calculating the end date based on the start date (DateTime) and duration (number of days), but my calculations do not include weekends or holidays.
So my decision is wrong. It was just a starting point.
I read several articles, and one of them is to create a giant calendar table that has all the weekends and holidays for the next 50 years. I guess the idea is to query the date range against the calendar table and subtract the number of days off and / or holidays.
The problem is that the software I'm working on allows users to set their own project calendar. Wouldn't a table become large to support, given that the software allows users to manage multiple projects?
So, I think, my question is, how do I get started and what are the possible approaches to this problem?
In principle, for each project task, I need to calculate the completion date of the task, taking into account the start date and DURATION, but taking into account weekends and user days (for example, holidays).
Any ideas?
BTW: I am using SQL Server 2005.
source
share