CalcDate based on Month (Eg: 08-07 or August 07)

Hi Guys,

I have a posting date filtering set by user.

If user set 01-08-07…3108-07, mine Cust. Ledger Entry.GetFilter(“Posting Date”) would retrieve value of 08-07 or Aug 07.

Eg: FilterText := Cust. Ledger Entry.GetFilter(“Posting Date”);

If Evaluate (FilterDate,FilterText) Then; //convert filter text to date format

Now I would like to FilterDate1 := CalcDate(’-1Y’, FilterDate) ?

It gave me an error:
You cannot base a date calculation on an undefined date.
Date : 0D
Formula: -1Y

Hi,

In your filter you , have a range , thus you need to split it to dates .

Look at R321 as an example :

MaxDate := GETRANGEMAX(“Date Filter”);

MinDate := GETRANGEMIN(“Date Filter”);

Then you can do your calcdate.

Gabor