Add 2 Hours To Date Value With Working Hours Condition in Access 2007

Status
Not open for further replies.

naveensg

New member
Local time
Today, 00:22
Joined
Aug 3, 2012
Messages
7
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
 
Please refrain from Double posting, future instance may be treated as SPAM with all the attendant implications that are associated with SPAM.
 
Status
Not open for further replies.

Users who are viewing this thread

Back
Top Bottom