1 Reply Latest reply: Apr 3, 2007 6:53 AM by PhHein RSS

    Help with Calendar format

    807606
      Hello everyone,

      in the code that i am modifying, they have the following
      Calendar cal = Calendar.getInstance();
      stringCal = cal.toString;
      The string output from cal.toString is:
      java.util.GregorianCalendar[time=1175598364139,areFieldsSet=true,areAllField
      sSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id="Europe/London",offset=0,dstSavings=3600000,useDaylight=true,transitions=242,lastRule=java.util.SimpleTimeZone[id=Europe/London,offset=0,dstSavings=3600000,useDaylight=true,startYear=0,startMode=2,startMonth=2,startDay=-1,startDayOfWeek=1,startTime=3600000,startTimeMode=2,endMode=2,endMonth=9,endDay=-1,endDayOfWeek=1,endTime=3600000,endTimeMode=2]],firstDayOfWeek=2,minimalDaysInFirstWeek=4,ERA=1,YEAR=2007,MONTH=3,WEEK_OF_YEAR=14,WEEK_OF_MONTH=1,DAY_OF_MONTH=3,DAY_OF_YEAR=93,DAY_OF_WEEK=3,DAY_OF_WEEK_IN_MONTH=1,AM_PM=1,HOUR=0,HOUR_OF_DAY=12,MINUTE=6,SECOND=4,MILLISECOND=139,ZONE_OFFSET=0,DST_OFFSET=3600000]
      However later on the JAXB marshaller requires the element as a Calendar.... so basically I have to convert that dodgy string into a calendar, with the format yyyyMMdd'T'HH:mm:ss:SSZ

      Any help is greatly appreciated