I have done following code:
String str = \"2013-01-17 11:26\"; DateFormat dateFormat = new SimpleDateFormat(\"yyyy-mm-dd hh:MM\"); Date date = dateFormat.parse(s
You are using the wrong format. MM is for month, and mm is for minutes, and for hours use HH. See SimpleDateFormat for various other formats.
MM
month
mm
minutes
hours
HH
Change your format to: -
DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm");