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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calculating Weekdays

Status
Not open for further replies.

Viv1

Programmer
Dec 9, 2003
42
GB
Hi, Please can anyone tell me if there is a simple way to find out the number of working days (Mon-Fri) between 2 dates without having to use a form? I need to know the total working days and would like to be able to include it in the query criteria.

Any help greatly appreciated,
Viv
 
Hi, problem is I am not sure what to do with this code and I need to include it in a query. I have the straight forward DatDiff working but this counts all days and I need to take out weekends. Most of the coding examples don't seem suitable for queries.

Thanks, Viv
 
After putting the code in a module, in your query you put:

SELECT DeltaDays([StDt], [EndDt]), OtherField FROM TableName

Leslie

Anything worth doing is a lot more difficult than it's worth - Unknown Induhvidual

Essential reading for anyone working with databases: The Fundamentals of Relational Database Design
 
Thank you, I will give it a go!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top