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

How many working days in a date range?

Status
Not open for further replies.

tony4x4

Technical User
May 14, 2002
13
0
0
ZA
I am putting together a database to keep track of my staff records. One of the records I want to track is leave (vacation) records. I have created a form which asks for Start Date of Leave and End Date of Leave. I would like to know how to calculate the amount of working days (i.e. Mon - Fri) there are between those days to give me total working days taken as leave.
 
Try the datediff functions;
datediff("w",[startdate],[enddate])

The "w" should make it only include weekdays!

There are lots of FAQ's on this subject; try 'weekdays' or 'datdiff' in a keywork search.

MIKE
 
Sorry, the "w" doesn;t restrict DateDiff to specific days of the week. Even if it did. Tony4x4 would soon have unhapy (HIGHLY IRATE) employees when he charged vacation time for legitiment holidays -just because they happened to fall on a weekday of their vacation time.

see faq181-261

MichaelRed
m.red@att.net

There is never time to do it right but there is always time to do it over
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top