Hi,
I suggest you two different solutions hoping you will find them helpfull.
1. You can keep the script you have written and change the type of the analytical driver from 'Date' to 'String'.
Obviously in this way you will not have the possibility of choosing the value of the parameter from the calendar.
Please notice that if you choose this solution you may change the single quote marks to double quote marks as follow:
Date now = new Date();
int year =now.getYear()+1900;
if (now.getMonth()>2) year=year+1;
String toReturn = "31/03/"+ year.toString();
returnValue(toReturn);
This is due to a bug we will fix as soon as possible: https://www.knowage-suite.com/jira/browse/KNOW-16
2. The second possibility, if you want to use an AD of date type is to add the date format to your string.
I write you down an example which you can use to create your solution:
Date now = new Date();
int year =now.getYear()+1900;
if (now.getMonth()>2) year=year+1;
returnValue("31/03/"+year+"#dd/MM/yyyy");