Hello,
How would I create a query that counts the number of business days only?
Thank you,
T
Hello,
How would I create a query that counts the number of business days only?
Thank you,
T
Import the attached module into your database and use the custom function usbNetWorkdays in your query (takes start date and end date as arguments). Note that if you want to exclude stat holidays you will need to create a table and maintain it yourself.
Have also a look at this thread: https://access-programmers.co.uk/for...d.php?t=173982
Cheers,
Vlad
Simply use NETWORKDAYS() function:
, where DateFrom and DateUntil must be dates, numbers representing dates, or formulas returning a date (NB! A date, not a date string!);'Code:=(NETWORKDAYS(DateFrom,DateUntil)
or
, where HolidayRange is a reference to cell range or named range, where holiday dates or numbers representing holiday dates are stored;Code:=(NETWORKDAYS(DateFrom,DateUntil, HolidayRange)
or
, where numbers representing holiday dates are given as array (I'm not sure about array delimiter - it may be different for different regional settings).Code:=(NETWORKDAYS(DateFrom, DateUntil, {Holiday1; Holiday2; ...; HolidayN})
NETWORKDAYS() is an Excel function; google Access + Networwdays+function and you'll get a lot of links with all kinds of solutions, but I like the one I posted the most.
Cheers,
Vlad
Thank you both for your help!
Traci