A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

How to calculate overdue?



 
 
Thread Tools Display Modes
  #1  
Old May 5th, 2010, 07:55 PM posted to microsoft.public.access.queries
Jim
external usenet poster
 
Posts: 39
Default 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  
Old May 5th, 2010, 08:42 PM posted to microsoft.public.access.queries
John Spencer
external usenet poster
 
Posts: 7,815
Default 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  
Old May 6th, 2010, 01:35 PM posted to microsoft.public.access.queries
John Spencer
external usenet poster
 
Posts: 7,815
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 06:11 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.