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

Time taken [business days only] 1

Status
Not open for further replies.

pflangan

Programmer
Jun 13, 2001
49
GB
I need to calculate the time taken to resolve support calls in an msAccess query. Now i've seen all the tips on not including weekends / holidays etc. but I don't think they are relevant to my problem. maybe i'm wrong. anyhoo
 
The problem with using "business days" as a definition is that every one has got a different idea of what are holidays. (government, bank, your particular business)

The easiest solution that I can think of, unfortunately, is to create a separate table. I would call this table tblDaysOff and it would have one field, Date. In this table I would put all dates for weekend days and any holidays that you might have.

Then, in your query, you would take the difference between the call received date and resolution date. From this number, you would subtract the number of non-work days between the two dates.

An example:
[tt]
SELECT DateDiff("d",ReceivedDate,ResolvedDate)-(
SELECT COUNT(*)
FROM tblDaysOff
WHERE [Date] Between ReceivedDate And ResolvedDate
)
FROM tblCallLog
[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top