Skip to Content
avatar image
Former Member

Date Calculation


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:


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


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.


Best Regards,


Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    avatar image
    Former Member
    Nov 09, 2005 at 08:49 PM

    Hi Duke,

    import java.text.*



    Add comment
    10|10000 characters needed characters exceeded