Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

calculate NETWORKDAYS in access 2000

Status
Not open for further replies.

suzyque

IS-IT--Management
Joined
Jan 27, 2003
Messages
2
Location
US
What do I put in the query builder to calculate working days? I ASSUME I do it via the query builder - but I may be wrong.
 
I did look at that FAQ before I posted. I am new at this - and need more of a "dummies" explanation
 
Well, first you create a table, tblHolidays. Then you add the two fields HoliDate and HoliName. Make the Datatype for HoliDate a Date/Time field, Short Date. HoliName is just a Text Field. Then you put in all the holidays you need to deal with in this table with their dates. Then you copy and paste the function DeltaDays() into a new module in your database. Name it funDeltaDays. Then in your query that has the two dates put this in a new column

NumDays: DeltaDays([StDt], [EndDt])

Put the names of your date fields where you see [StDt] and [EndDt].

That will count the number of work days between the dates excluding weekends and holidays.

Post back if you have any problems.

Paul



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top