Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DATE RANGE PROBLEM PLUS MINUS 7 DAYS 1

Status
Not open for further replies.

Dausa67

Technical User
Oct 1, 2008
96
US
Good afternoon,
I have a report that I need to only pull records that are within plus or minus 7 days of current date.

This is what I have:
First, I have to choose between the need date or the promise date. (which works fine)
Formula:
Code:
IF {@PROMISE DATE} = 'NULL' THEN 
{ASI_PURCHASE_ORDER.NEED_DATE} ELSE
{ASI_PURCHASE_ORDER.PROMISE_DATE}

Second, I have created another date field in order to pull only records that are within plus or minus 7 days of current date. (which does not work)
Code:
if {@EXPECTED ON DOCK DATE} IN Last7Days and
{@EXPECTED ON DOCK DATE} IN Next30Days THEN 
{@EXPECTED ON DOCK DATE}

The results that I get are all records within the last 7 days but no records for the next seven days.

Can someone tell me what I am doing wrong?
Thank you in advance for your help.


Clay
 

If the first formula in your post is {@EXPECTED ON DOCK DATE}, then I think you want your selection formula to be:

{@EXPECTED ON DOCK DATE} in currentdate - 7 to currentdate + 7

Keep in mind that this is actually a 15 day span since it includes the current date in the middle. You may want to modify the 7 to a 6 at one end of the formula depending on your requirement.



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top