Substract Business Days
Posted: Fri Oct 15, 2010 1:21 am
Hi ,
I have a requirement to substract 3 business days from dates received from source by looking upon a table (this table will have all business days , it doesnt contain any holidays ).Please check the below scenarios.
i/p date : 15-oct-2010 and lets say that 13-oct-2010 is a holiday as per the look up table ,then my o/p date :11-oct-2010
i/p date : 18-oct-2010 and lets say 16 & 17(sat&sun) are holidays as per the look up table ,then my o/p date :13-oct-2010
i/p date : 18-oct-2010 and lets say 15-oct-2010 is a holiday and 16&17 ar also holidays(sat&sun) as per the look up table, then my o/p date :12-oct-2010
i/p date :16-oct-2010(holiday (sat) as per look up table) then my o/p date :12-oct-2010.
Please provide your valuable approaches on this requirement
I have a requirement to substract 3 business days from dates received from source by looking upon a table (this table will have all business days , it doesnt contain any holidays ).Please check the below scenarios.
i/p date : 15-oct-2010 and lets say that 13-oct-2010 is a holiday as per the look up table ,then my o/p date :11-oct-2010
i/p date : 18-oct-2010 and lets say 16 & 17(sat&sun) are holidays as per the look up table ,then my o/p date :13-oct-2010
i/p date : 18-oct-2010 and lets say 15-oct-2010 is a holiday and 16&17 ar also holidays(sat&sun) as per the look up table, then my o/p date :12-oct-2010
i/p date :16-oct-2010(holiday (sat) as per look up table) then my o/p date :12-oct-2010.
Please provide your valuable approaches on this requirement