date difference excluding Holidays
Posted on 2010-11-20
Hi All Experts,
I have a problem.I have two dates in my datasets.First is an Activity Start date and second is activity end date.There is a field like activity description.So i have to prefix text "Exceeds 10 business days" before activity text where activity is completed in more than 10 days.
So i was using below query:
Update Activity_table set activity_text = 'Exceeds 10 business days' || activity_text
where activity_end_date - activity_start_date > 10;
now the problem is that i need to count only business days means i have to exclude the weekends and all US holidays when counting the difference between two dates.
For excluding USA holidays,what should be the approach like will i need to make another table having the dates of holidays.Plesae give a detailed answer because i am not aware how to proceed on this problem.