3 Replies Latest reply on Feb 5, 2004 2:43 AM by 807582

    A strange event about Date....

      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 java.io.*...