on 11-09-2005 8:34 PM
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
Hi Duke,
import java.text.*
http://java.sun.com/j2se/1.4.2/docs/api/java/text/DateFormat.html
Regards
Anand
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.