问题
Excel's NETWORKDAYS function returns the net working days between two dates. Is there a way of replicating this when connecting to a Jet database via ADO?
回答1:
See:
Why should I consider using an auxiliary calendar table?
A calendar table can make it much easier to develop solutions around any business model which involves dates. Last I checked, this encompasses pretty much any business model you can think of, to some degree. Constant problems that end up requiring verbose, complicated and inefficient methods include the following questions:
- How many business days between x and y?
While the article includes SQL Server code, the concept is universal and the code can be ported to the Access Database Engine with ease.
回答2:
A bounty on my original question on SU finally teased an answer out of the community
https://superuser.com/questions/35716/equivalent-of-excels-networkdays-function-with-jet-ado
来源:https://stackoverflow.com/questions/1431498/equivalent-of-excel-s-networkdays-function-with-jet-ado