Sure. I just built this and tested it on 4.0(3)_Build080.
It generates a prompt from a Date object and reads it back. That's today. Then it uses the Calendar class to construct a new Calendar representing right now, adds 30 days, and converts it to a java.util.Date class to return to a variable of Date. It generates the new date prompt and plays it back.
I declare three variables:
dateToday - Date - new Date()
dateTodayPlus30 - Date - null
promptGenerated - Prompt - null
The important bit is done in the expression editor. The "SET" node is used setting the dateTodayPlus30 variable using a block statement as follows:
{
// get right now
java.util.Calendar rightNow = java.util.GregorianCalendar.getInstance();
// add 30 days
rightNow.add(java.util.Calendar.DATE, 30);
// CRS wants a java.util.Date type
return rightNow.getTime();
}
Regards,
Geoff