This discussion is archived
3 Replies Latest reply: Feb 4, 2004 6:43 PM by 807582 RSS

A strange event about Date....

807582 Newbie
Currently Being Moderated
first of all, I have this method
     public Date createDate(String StringDate){
          int month = Integer.parseInt(StringDate.substring(0,2))-1;
          int day = Integer.parseInt(StringDate.substring(3,5));
          int year = Integer.parseInt(StringDate.substring(6,10));
          aCalendar.set(year, month, day);
          Date makeDate = aCalendar.getTime();

something strange happen when it try to save the time from aCalendar into makeDate

incompatible types
found : java.util.Date
required: Date
          Date makeDate = aCalendar.getTime();

something wrong here???or I"M missing something.... I have import util.*; already as well as*...