Norm, aussiemcgr,
Thanks for the help, especially the tip about toString! #:-s
I should have mentioned the string the program was giving me in the OP, would have saved us some time haha.
Dave
Type: Posts; User: dave_nj
Norm, aussiemcgr,
Thanks for the help, especially the tip about toString! #:-s
I should have mentioned the string the program was giving me in the OP, would have saved us some time haha.
Dave
Norm,
The text of the error is the same as originally,
required: Date
found: java.util.Date
doh is "Date"
aussiemcgr,
I actually added the
Date(int m, int d, int y)
{
month = m;
day = d;
year = y;
} to the Date class, it wasn't there before.
java.util.Date convertedDate = DOB.parse(datestring);
Calendar calendar = Calendar.getInstance();
calendar.setTime(convertedDate);
this.doh = calendar.getTime();
Same error.
This is all it contains:
public class Date
{
private int month;
private int day;
private int year;
Date()
{
I feel like I should be the one asking this question!
Hi Norm,
I actually tried that but there are other lines which compare convertedDate to objects represented in the Date class, so they have to be compatible at some point.
The program is...
I have this section:
public void set_doh(int new_m, int new_d, int new_y)
{
String datestring = Integer.toString(new_m) + "/" + Integer.toString(new_d) + "/" + Integer.toString(new_y);...