Hi All ,
On a report, when a user enters a start date e.g. 25/03/10 and an end date 30/06/10 i want to be able to return the previous year's orders for them. e.g. (last year start date)25/03/09 and (last year end date) 30/06/09.
how do i go about finding the preivous year's date?
0
Comments
I think CalcDate function may be helpful to you.
Hemant
They can conquer who believe they can.
lastdate:=('-1Y',startdate)
Hemant
They can conquer who believe they can.
Another way to get the right help is to open the C/AL editor, open the C/AL Symbol Menu (press F5), browse down to SYSTEM on the left side, then to 'Date' in the middle, then CALCDATE on the right, and then hit F1.
RIS Plus, LLC
CalcDate('<-1Y>',startDate);
If you use the '<' and '>' the Calcdate will use the English date calculation.
Otherwise it will use the local translated to the client language Calcdate abbreviations.
Like '<1Y>' in English will translate into '1J' in Dutch.
Hope this helps,
Willy
Teach a man to fish. :thumbsup:
RIS Plus, LLC