I have been working on a leave module and it created this problem. I am trying to identify the end date from a given start date after deducting the public holidays including Fridays & Saturdays. It works like this,
Suppose, the starting date is '22-Jun-2010' and the No of days employee wishes to take for leave is 25 days. I wanted to calculate the end date excluding the public holidays (Fridays and Saturdays).
Leave Requested - Start Date = '22/06/2010'
No of days requested = 25 Days
Public Holiday (National Day) = '26/07/2010'
Public Holiday (On the occasion) = '27/07/2010'
Leave Start Date: '22/06/2010'
Leave End Date: 28/06/2010'
(End Date must be calculated without including the Fridays and Saturdays or any given Public Holiday[National Day &On the occasion] - )
Could some please provide me with a T-sql solution into achieving this.
Thank you very much
View Complete Post