Convert String Date to GregorianCalendar
843841Mar 7 2004 — edited Mar 7 2004anyones noes the coding for the converstation of Date as in String format to GregorianCalendar??
I have a piece of coding here.. but wen i called this method.. Its gives me a null pointer error.. Btw.. im using Tomcat to run tat.. coz im doing JSP and servlets now..
public GregorianCalendar convertDate(String date)
{
int day, month,year;
day = Integer.parseInt(date.substring(0,2));
month= Integer.parseInt(date.substring(3,5));
year = Integer.parseInt(date.substring(6,10));
return new GregorianCalendar(year, month-1, day);
}