Date range for previous 7 days

ajitajit Member Posts: 4
edited 2004-11-12 in Navision Attain
Hi,
Does anyone know how to set date range where by i want to access records from the current date to the last 7 days or 9 days.

I don't want to manually specify the dates, as i want to use an automated program (expandit Launch Utility). to run a report whereby the script will put the current date minus the last 7 days transaction.

[/quote]

Comments

  • janebucikjanebucik Member Posts: 5
    You can do it like this:

    SETFILTER("Posting Date",'%1..',WORKDATE-NoOfDays)

    where NoOfDays is of type integer
  • Tommy_SchouTommy_Schou Member Posts: 117
    ajit wrote:
    Hi,
    Does anyone know how to set date range where by i want to access records from the current date to the last 7 days or 9 days.

    I don't want to manually specify the dates, as i want to use an automated program (expandit Launch Utility). to run a report whereby the script will put the current date minus the last 7 days transaction.
    CustLE.SETCURRENTKEY(Open,"Due Date");
    CustLE.SETRANGE(Open,TRUE);
    CustLE.SETRANGE("Due Date",TODAY,TODAY-7);
    FORM.RUNMODAL(0,CustLE);
    

    The above should do that. Just replace 7 by any old integer variable.
    Best regards
    Tommy
Sign In or Register to comment.