Date Time Difference, Excluding Holidays & Weekend (1 Viewer)

martinjward

Registered User.
Local time
Today, 23:54
Joined
Sep 28, 2007
Messages
22
I am new to VBA and I require a re-usable function that calculates the diffence between two dates in days, hours & minuites - but only for working hours, excluding bank holidays & weekends. Complicated I know, but the requirement is to work out how long a process has taken in 'business time'.

I need this to be reusable as there is potential to need this is multiple applications long term. I have a 'common' database that holds staff, site and similar information - so the addition of a list of bank holidays in the common DB and the use a link table to the application is not a problem, the same with a record in the common DB detailing working hours.

Unfortunatly the requirment is due before I get on a course and this the only bit I am really stuck on. I can not find any help on excluding bank holidays on several web sites / forums, so an example would be very greatly appreciated & make me the hero of the second.
 

Velosai

Registered Headache Cause
Local time
Today, 23:54
Joined
Aug 3, 2007
Messages
38
Are you looking for a duration in days, hours, minutes?
 

raskew

AWF VIP
Local time
Today, 17:54
Joined
Jun 2, 2001
Messages
2,734
Hi -

Do a search in this forum on bank holiday . You'll find a wealth of information.

Bob
 

martinjward

Registered User.
Local time
Today, 23:54
Joined
Sep 28, 2007
Messages
22
I do need the results in days hours, minuites.

Additionaly I need the results to be calculated for working hours only (I will define these in a record) and exclude and dates in a holiday table.
 

Users who are viewing this thread

Top Bottom