COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: arishsu on 20 May 2016 02:27:21 AM

Title: due date calculation excluding holidays and weekends
Post by: arishsu on 20 May 2016 02:27:21 AM
Hi

I need to add a new column 'Due date' to a report. I have a 'Report DateTime' and due date needs to be calculated by adding 20 business days to report date time. But weekneds and national holidays must be excluded.

Can anyone please give me some suggestions?
Title: Re: due date calculation excluding holidays and weekends
Post by: BigChris on 20 May 2016 03:26:57 AM
Weekends aren't too bad...you can work out how many days to add to the current date based on the day of the week. Can't think of a way to take out the national holidays though. The best option would be to create a calendar table in your database, and populate it with every date in one column and the required end date in the another. Whilst you're doing that you could add in any other dates that are relevant to your business, e.g. Fiscal Period Start Date, Fiscal Period End Date, Working Day, Working Days in Period, Working Days Elapsed in Period et. etc.