Hello all,
I want to add 2 hours to Start Date/Time to get the Target Time, with the Condition of working hours. Let me explain with examples:
Workings hours 8:00 AM to 5:00 PM
Examples
1) Start Time : 7/13/2012 8:48 AM adding 2 hours will result 7/13/2012 10:48 AM
2) Start Time : 7/13/2012 7:48 AM (outside working hours) adding 2 hours will result in 7/13/2012 10:00 AM
3) Start Time : 7/13/2012 4:48 PM adding 2 hours will result 7/16/2012 9:48 AM (Sat & Sund should be ignored)
4) Start Time : 7/12/2012 9:48 PM (outside working hours) adding 2 hours will result in 7/13/2012 10:00 AM
I hope i have explained my question with these examples. I need a Code or formula to satisfy all these conditions.
Basically i am adding 2 hours to a date with Working hours & Working days Condition.
** Note: If the Code include Holiday Option then it would be great.
Thanks,
NG
I want to add 2 hours to Start Date/Time to get the Target Time, with the Condition of working hours. Let me explain with examples:
Workings hours 8:00 AM to 5:00 PM
Examples
1) Start Time : 7/13/2012 8:48 AM adding 2 hours will result 7/13/2012 10:48 AM
2) Start Time : 7/13/2012 7:48 AM (outside working hours) adding 2 hours will result in 7/13/2012 10:00 AM
3) Start Time : 7/13/2012 4:48 PM adding 2 hours will result 7/16/2012 9:48 AM (Sat & Sund should be ignored)
4) Start Time : 7/12/2012 9:48 PM (outside working hours) adding 2 hours will result in 7/13/2012 10:00 AM
I hope i have explained my question with these examples. I need a Code or formula to satisfy all these conditions.
Basically i am adding 2 hours to a date with Working hours & Working days Condition.
** Note: If the Code include Holiday Option then it would be great.
Thanks,
NG