I want to convert a string to date before storing it and I used
SimpleDateFormat format = new SimpleDateFormat(\"yyyy-mm-dd\"); Date returnDate = format.parse(d
In your DateFormat use MM for month instead of mm, that is for minutes
MM
mm
Reference: http://docs.oracle.com/javase/6/docs/api/java/text/SimpleDateFormat.html