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

Using DateDiff in Access

Status
Not open for further replies.

coachdan

MIS
Mar 1, 2002
269
US
I need to calculate the number of weekdays between two dates (ClsStDate and ClsEndDate) and I am unsure of how to do it. Does it need to be done in a form or report, or can it be done in a query? What would the expression look like? It is for year 2000 data. I have tried several different expressions and it keeps prompting me for a "w" parameter, which is the interval (weekday).

coachdan32
 
Correction. I had a brain f**t, the year is 2002.

coachdan32
 
It can be done in a form, report and query. If you have Access 2000 or greater, you can use the help function to look up DateDiff.
=DateDiff("d",[ClsStDate],[ClsEndDate])
d for days
w for weeks
m for months. Just look up the function syntax.
Little known fact: Microsoft "brought" this function over from Lotus but didn't document it until Office 2000.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top