I have a String that represents a date in French locale : 09-oct-08 :
I need to parse that String so I came up with this SimpleDa
String format2 = "dd-MMM-yy";
Date date = Calendar.getInstance().getTime();
SimpleDateFormat sdf = new SimpleDateFormat(format2);
System.out.println(sdf.format(date));
Outputs 28-Oct-09
I don't see any dots sir. Have you tried re-checking your prints? Maybe you accidentally placed a . beside your MMM?
You're getting java.text.ParseException: Unparseable date: "09-oct-08" since "09-oct-08" does not match the formatting of Locale.FRENCH either use the default locale(US I think) or add a . beside your oct