I am trying to build an AX service to retrieve data from InventTable in Microsoft Dynamics AX 2009. 
With reference to <https://community.dynamics.com/ax/f/33/t/70476.aspx> ,I tried to execute a code in AOT Job for retrieving data with modifieddate="2/7/2013"
The code sample is as below:

```
    static void SelectQueryTest(Args _args)
    {
       Query q = new Query();
    QueryRun qr;
    QueryBuildDataSource qbds;
    int64 countItem;
    InventTable inventTable;
    Fromdate FromDate = 2\7\2013;

    ;

    qbds = q.addDataSource(tableNum(InventTable));
    qbds.addRange(fieldNum(InventTable, modifiedDateTime)).value(date2StrUsr(FromDate ));
    qr = new QueryRun(q);
    countItem =SysQuery::countTotal(qr);
   if(countItem>0)
   {

     while(qr.next())
    {

        inventTable = qr.get(tableNum(inventTable));
        info(strfmt("Item Name: %1", inventTable.ItemName));
    }
   }
   else
   {
     info("No records found");
   }

    }

```

Can any one suggest me how to write a code which retrieves data using offset and limit that is taken from a webservice request.