date difference excluding weekends

G

Guest

Hi,

I am trying to write a query that will count the number of days between two
dates but exclude weekends from the count. Any help would be greatly
appreciated
 
G

Guest

If you don't want to use code, you can calculate in a query

Total Days:DateDiff("d",[date field to start from],[date field to end from])
Weekends:DateDiff("ww",[date field to start from],[date field to end from])
Total Weekdays:[Total Days] - ([Weekends]*2)
 
G

Guest

Mikedsn - thanks for this info, you've saved me alot of messing about

Mikedsn said:
If you don't want to use code, you can calculate in a query

Total Days:DateDiff("d",[date field to start from],[date field to end from])
Weekends:DateDiff("ww",[date field to start from],[date field to end from])
Total Weekdays:[Total Days] - ([Weekends]*2)


Allen Browne said:
 
A

Aaron

Thank you Mikedsn
--
..


chrisp80 said:
Mikedsn - thanks for this info, you've saved me alot of messing about

Mikedsn said:
If you don't want to use code, you can calculate in a query

Total Days:DateDiff("d",[date field to start from],[date field to end from])
Weekends:DateDiff("ww",[date field to start from],[date field to end from])
Total Weekdays:[Total Days] - ([Weekends]*2)


Allen Browne said:
See:
Doing WorkDay Math in VBA
at:
http://www.mvps.org/access/datetime/date0012.htm

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

Hi,

I am trying to write a query that will count the number of days between
two
dates but exclude weekends from the count. Any help would be greatly
appreciated
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top