If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
How to calculate overdue?
We have a customer that has terms of June/1 or Net 60. Any orders placed
between 10/2 of the previous year and June 1 of the current year have terms of 6/1. Orders placed between 6/2 and 10/1 have terms of Net 60. How can I calculate this in a query? Thanks Jim |
#2
|
|||
|
|||
How to calculate overdue?
Perhaps the following
IIF(Format(OrderDate,"MMDD") Between "0602" and "1001" ,OrderDate + 60 ,DateSerial(Year(OrderDate) + Abs(Format(OrderDate,"mmdd") Between "1002" and "12/31") ,6,1)) John Spencer Access MVP 2002-2005, 2007-2010 The Hilltop Institute University of Maryland Baltimore County Jim wrote: We have a customer that has terms of June/1 or Net 60. Any orders placed between 10/2 of the previous year and June 1 of the current year have terms of 6/1. Orders placed between 6/2 and 10/1 have terms of Net 60. How can I calculate this in a query? Thanks Jim |
#3
|
|||
|
|||
How to calculate overdue?
Whoops! Slight error in that expression.
IIF(Format(OrderDate,"MMDD") Between "0602" and "1001" ,OrderDate + 60 ,DateSerial(Year(OrderDate) + Abs(Format(OrderDate,"mmdd") Between "1002" and "1231") ,6,1)) John Spencer Access MVP 2002-2005, 2007-2010 The Hilltop Institute University of Maryland Baltimore County John Spencer wrote: Perhaps the following IIF(Format(OrderDate,"MMDD") Between "0602" and "1001" ,OrderDate + 60 ,DateSerial(Year(OrderDate) + Abs(Format(OrderDate,"mmdd") Between "1002" and "12/31") ,6,1)) John Spencer Access MVP 2002-2005, 2007-2010 The Hilltop Institute University of Maryland Baltimore County Jim wrote: We have a customer that has terms of June/1 or Net 60. Any orders placed between 10/2 of the previous year and June 1 of the current year have terms of 6/1. Orders placed between 6/2 and 10/1 have terms of Net 60. How can I calculate this in a query? Thanks Jim |
Thread Tools | |
Display Modes | |
|
|