I am unable to covert String values in The Java.util Date format.
This is my code
String string = "24-Nov-2012 14:21:56";
Date soldate = new SimpleDateFormat("dd-MMM-yyyy HH:mm:ss zzz").parse(string); // problem in this line
System.out.println(soldate);
Please help me to solve this issue.
You don’t have that
zzz - TimeZonepart in your string. So, your format cannot parse your string. As it is different from the actual string format.Just remove it: –