Hours btw two dates?

A

Arul

I have a start date and an end date. I'm trying to find the difference
between these two dates in hours...ignoring weekends/holidays and accounting
only for 8 hours a day (9 AM - 5PM). Example...
Start Date: 02/04/2005 3 PM
End Date: 02/07/2005 10 AM
Diff = 3 Hrs.

Can someone please help?
 
L

Lynn Trapp

Arul,
I read your request way too fast. You will need to do a lot more work than I
gave you to accomplish what you want. You'll need to take the function that
Chris pointed you to and expand it some to get where you need to be.
 
C

Chris2

Arul said:
I have a start date and an end date. I'm trying to find the difference
between these two dates in hours...ignoring weekends/holidays and accounting
only for 8 hours a day (9 AM - 5PM). Example...
Start Date: 02/04/2005 3 PM
End Date: 02/07/2005 10 AM
Diff = 3 Hrs.

Can someone please help?


Arul,

MS Access has no built-in ability to do this.

It has to be calculated using code.

See http://www.mvps.org/access/datetime/date0012.htm, for examples of
how to do Work Day math in VBA.


Sincerely,

Chris O.
 
Top