Access - Calculating time between dates

Associate
Joined
15 Jun 2009
Posts
2,494
I have a database which, Amongst other information, has a time started and a time finished field. From those, There is a calculated field to work out how long in hours there was between those dates.

However, it doesn't take into account weekend, So if it was started on a Friday and finished on a Friday, it would show an extra ~48 hours on that.

Is there anyway to let it calculate minus the weekends?

*May I also add 'Is there any EASY way to do this'? Most of the VB stuff I don't understand.
 
Don't worry about vb, just paste the code in this article into a module and you can reference the function as you would a normal in built function.

http://msdn.microsoft.com/en-us/library/dd327646(v=office.12).aspx

There are other ways to do what you need to do but this is the easiest.

All you need to do is to supply the function with a start date (time started field) and end date (time finished field) and you are done.
 
Last edited:
Back
Top Bottom