To Increamennt Year by 1

Dear All,

Kindly Suggest.

I have prepared a Customer Ageing Report in which i have taken Financial Year from Sales and Receivables Setup as

intFinYear:=DATE2DMY(recSalesRecSetUp.“Current Year Fin Start Date”,3);

And for Month of January 2013 i have written as

dtJanStDate:=DMY2DATE(1,1,intFinYear+1);
dtJanEnDate:=DMY2DATE(31,1,intFinYear+1);

But after this also system is not fetching the data for the month of January as per the Filter applied as

recSIL.SETFILTER(recSIL.“Posting Date”,’%1…%2’,dtJanStDate,dtJanEnDate);

Kindly suggest

Preeti

May I Know what value do you have in recSalesRecSetUp.“Current Year Fin Start Date” field?

Dear Mohana,

I have taken the Current Year as 1-4-12

The issue is resolved and i want the Year as “intFinYear+1” so that it got increament by 1

You can get year from below expression

CALCDATE(’<CY+1D>’,recSalesRecSetUp.“Current Year Fin Start Date”)

Or You can increment Date with 1Y and get the year from that caluclation also

CALCDATE(’<1Y>’,recSalesRecSetUp.“Current Year Fin Start Date”)