cancel
Showing results for 
Search instead for 
Did you mean: 

Date Calculation

Former Member
0 Kudos

Hi,

I'm trying to create a user function to calculate a date where start date + 40 days.

Start date is the input to the user funciton.

The function consists of the following code:

<i>

Calendar calendar = Calendar.getInstance(); 
DateFormat dateFormat = new SimpleDateFormat("MM/dd/yyyy"); 
Date date = dateFormat.parse(startDate); 
calendar.setTime(date);
calendar.add(Calendar.DATE, 40);
String endDate = calendar.toString();
return endDate;

</i>

I get the error messages, "cannot resolve symbol symbol : class DateFormat" and "cannot resolve symbol symbol : class SimpleDateFormat".

Are there imports I need to reference? Is there another way to do the above?

Any help would be greatly appreciated.

Thanks.

Best Regards,

Duke

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos
Former Member
0 Kudos

Thanks Anand!!

Answers (0)