Possible Duplicate:
Improper result of SimpleDateFormat
The following code outputs a date of 00/12/2010. I can't figure out why the date string is parsed without exception but the month is set to 00. I tried using a second argument to the SimpleDateFormat constructor of Locale.Enlgish for sanity's sake but that didn't help. Any suggestions?
String dateString = "12-OCT-10";
SimpleDateFormat formatFrom = new SimpleDateFormat("dd-MMM-yy");
Date date = formatFrom.parse(dateString);
SimpleDateFormat formatTo = new SimpleDateFormat("mm/dd/yyyy");
System.out.println(formatTo.format(date));