How to calculate overdue?

J

Jim

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
 
J

John Spencer

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
 
J

John Spencer

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
 

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

Top