G
Guest
I'm trying to duplicate a formula that I'm using in Excel to Access. Here is
the formula I have in excel:
=IF(J4802>=I4802,NETWORKDAYS(I4802,J4802)-1,NETWORKDAYS(I4802,J4802)+1)
Column J is my ShipDate & column I is my DueDate.
Here is what I'm using in my Access query:
IIf([ShipDate]>=[DueDate],WorkingDays([DueDate],[ShipDate])-1,WorkingDays([DueDate],[ShipDate])+1)
I'm using the function found here:
http://www.mvps.org/access/datetime/date0006.htm
To test this I'm using 08/07/07 as my due date and 08/06/07 as my ship date.
When I calculate this in Excel I get a variance of -1. When I calculate this
in Access I get 1.
Can anyone shed some light on why the difference between the two?
The -1 is the correct variance since I want to get the variance of when an
order ships as opposed to when it was due.
the formula I have in excel:
=IF(J4802>=I4802,NETWORKDAYS(I4802,J4802)-1,NETWORKDAYS(I4802,J4802)+1)
Column J is my ShipDate & column I is my DueDate.
Here is what I'm using in my Access query:
IIf([ShipDate]>=[DueDate],WorkingDays([DueDate],[ShipDate])-1,WorkingDays([DueDate],[ShipDate])+1)
I'm using the function found here:
http://www.mvps.org/access/datetime/date0006.htm
To test this I'm using 08/07/07 as my due date and 08/06/07 as my ship date.
When I calculate this in Excel I get a variance of -1. When I calculate this
in Access I get 1.
Can anyone shed some light on why the difference between the two?
The -1 is the correct variance since I want to get the variance of when an
order ships as opposed to when it was due.