I have string "Tue Nov 12 2010",I want to parse it in java.util.Date object. I write below code for this
DateFormat format = new SimpleDateFormat("dd/MM/yyyy");
Date date= format.parse("Tue Nov 12 2010");
It is giving exception like below:
java.text.ParseException: Unparseable date: "Sun Nov 21 2010"
Not getting what is wrong with it???
Your format is wrong - if you specify a format dd/MM/yyyy, then you need to supply the string to be formatted in the corresponding format (!) e.g. 21/11/2010.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With