Hello All,
Sorry for the long description of the requirements, need your help in below situations; Where i want add Business Hours/Days to get the Target Date.
Working hours: 8:00 AM to 19:00 PM
Urgency Type:
ND (Maximum 1 Day 11 hours)
3D (Maximum 3 Day 11 hours)
4D (Maximum 4 Day 11 hours)
5D (Maximum 5 Day 11 hours)
Threshhold - 16:30 PM
Weekends to be Excluded.
Holidays to be Excluded based on Country. Say I have 2 countries India and America, where America has holiday on 12/24/2012 but India does not have holiday on that Day. Hence while calculating Tgt date, India should be calculated normally, for America holiday date need to excluded(There will be a Holiday table based on the countries, not limited to 2 countries).
ex: 1) A ticket opened at 12/26/2012 8:56 AM; Target date will be 12/26/2012 19:00, in this case its 1 day 10:04 hours added to the Opened Time.
2) A ticket opened at 12/26/2012 16:56 PM; Target date will be 12/29/2012 19:00, in this case ticket opened after threshold time of 16:30, Technically ticket should start from next day i.e 12/28/2012 8:00 AM and 1 day 11 hours added to this date.
3) A ticket opened at 12/26/2012 7:56 AM(Before the begin of Working hours); Target date will be 12/26/2012 19:00, in this case its 1 day 11:00 hours added to the Opened Time.
4) A ticket opened at 12/21/2012 17:56 PM(After Threshold time); Target date will be 12/24/2012 19:00, in this case its 1 day 11:00 hours added to the Opened Time. If the above ticket belonged to America, then holiday dates(both 24 & 25) need to be skipped and Tgt date will be 12/27/2012 19:00.
Here is the Sample Data
Country Ticket Start Date/ Time Tgt Date/Time Expected Tgt Date/ Time
America ID000123 12/21/2012 18:20 12/27/2012 19:00
America ID000124 12/21/2012 6:54 12/26/2012 19:00
America ID000125 12/23/2012 8:20 12/27/2012 19:00
India ID000126 12/23/2012 21:20 12/26/2012 19:00
India ID000127 12/21/2012 15:18 12/24/2012 19:00
Australia ID000128 12/24/2012 13:20 12/27/2012 19:00
Australia ID000129 12/26/2012 13:20 12/28/2012 19:00
Australia ID000130 12/27/2012 12:20 12/28/2012 19:00
Holiday Table
Country Date Reason
America 12/24/2012 Chrismas Eve
America 12/25/2012 Chrismas
India 12/25/2012 Chrismas
Australia 12/25/2012 Chrismas
Australia 12/26/2012 Boxing Day
Great Britain 12/25/2012 Chrismas
Great Britain 12/26/2012 Boxing Day
Regards,
Naveen
I need results to be appear in the "Tgt Date/Time" column. I have also provided results in "Expected Tgt Date/ Time" for your help.
Advance thanks for all your efforts.
Regards,
NG
Sorry for the long description of the requirements, need your help in below situations; Where i want add Business Hours/Days to get the Target Date.
Working hours: 8:00 AM to 19:00 PM
Urgency Type:
ND (Maximum 1 Day 11 hours)
3D (Maximum 3 Day 11 hours)
4D (Maximum 4 Day 11 hours)
5D (Maximum 5 Day 11 hours)
Threshhold - 16:30 PM
Weekends to be Excluded.
Holidays to be Excluded based on Country. Say I have 2 countries India and America, where America has holiday on 12/24/2012 but India does not have holiday on that Day. Hence while calculating Tgt date, India should be calculated normally, for America holiday date need to excluded(There will be a Holiday table based on the countries, not limited to 2 countries).
ex: 1) A ticket opened at 12/26/2012 8:56 AM; Target date will be 12/26/2012 19:00, in this case its 1 day 10:04 hours added to the Opened Time.
2) A ticket opened at 12/26/2012 16:56 PM; Target date will be 12/29/2012 19:00, in this case ticket opened after threshold time of 16:30, Technically ticket should start from next day i.e 12/28/2012 8:00 AM and 1 day 11 hours added to this date.
3) A ticket opened at 12/26/2012 7:56 AM(Before the begin of Working hours); Target date will be 12/26/2012 19:00, in this case its 1 day 11:00 hours added to the Opened Time.
4) A ticket opened at 12/21/2012 17:56 PM(After Threshold time); Target date will be 12/24/2012 19:00, in this case its 1 day 11:00 hours added to the Opened Time. If the above ticket belonged to America, then holiday dates(both 24 & 25) need to be skipped and Tgt date will be 12/27/2012 19:00.
Here is the Sample Data
Country Ticket Start Date/ Time Tgt Date/Time Expected Tgt Date/ Time
America ID000123 12/21/2012 18:20 12/27/2012 19:00
America ID000124 12/21/2012 6:54 12/26/2012 19:00
America ID000125 12/23/2012 8:20 12/27/2012 19:00
India ID000126 12/23/2012 21:20 12/26/2012 19:00
India ID000127 12/21/2012 15:18 12/24/2012 19:00
Australia ID000128 12/24/2012 13:20 12/27/2012 19:00
Australia ID000129 12/26/2012 13:20 12/28/2012 19:00
Australia ID000130 12/27/2012 12:20 12/28/2012 19:00
Holiday Table
Country Date Reason
America 12/24/2012 Chrismas Eve
America 12/25/2012 Chrismas
India 12/25/2012 Chrismas
Australia 12/25/2012 Chrismas
Australia 12/26/2012 Boxing Day
Great Britain 12/25/2012 Chrismas
Great Britain 12/26/2012 Boxing Day
Regards,
Naveen
I need results to be appear in the "Tgt Date/Time" column. I have also provided results in "Expected Tgt Date/ Time" for your help.
Advance thanks for all your efforts.
Regards,
NG