Simulate MS Excel Workday & NetWorkday functions in MS Access

S

Stephen T. Bate

I would like to simulate 2 Excel functions in MS Access,
but cannot do this.

They are the MS Excel "Workday" and "Networkday" functions
The Workday function takes a start date and a number of
days you wish to calculate forward, ignoring Weekends and
Holidays. Holidays are bracketed in an Array.
In the following example, the start date is 05/12/2003 and
I wish to calculate 2 workings days ahead (Result is
09/12/2003)

Excel function is:
=WORKDAY("05/12/2003",2,
{"1/01/03","02/01/03","18/04/03","21/04/03","26/05/03","25/
08/03","25/12/03","26/12/03","27/12/03","28/12/03","29/12/0
3","30/12/03","31/12/03","01/01/04","02/01/04","09/04/04","
12/04/04","31/05/04","30/08/04","27/12/04","28/12/04","29/1
2/04","30/12/04","31/12/04","01/01/05","02/01/05"})


Similarly, the NetWorkday function calculates the Net
Working days between 2 dates, ignoring Weekends and
Holidays.
eg.
Start Date = 22/12/2003
End Date = 05/01/2004
Actual working days is 3
=(NETWORKDAYS("22/12/2003","05/01/2004",
{"1/01/03","02/01/03","18/04/03","21/04/03","26/05/03","25/
08/03","25/12/03","26/12/03","27/12/03","28/12/03","29/12/0
3","30/12/03","31/12/03","01/01/04","02/01/04","09/04/04","
12/04/04","31/05/04","30/08/04","27/12/04","28/12/04","29/1
2/04","30/12/04","31/12/04","01/01/05","02/01/05"})-1)

Can anybody help, please?

Thanks
Stephen Bate - Scotland
(e-mail address removed)
 

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

Similar Threads


Top