I have a problem in date conversion in my android application.
I have date strings like 2017-11-11 11:52
which its date is equal to 2017-Nov-11
but it is parsed as 2017-01-11
in below code snippet:
DateFormat df = new SimpleDateFormat("yyyy-MM-DD HH:mm");
try {
Date date = df.parse("2017-11-11 11:52");
Log.v("DATE_TAG","Date Time:"+date.toString());
} catch (ParseException e) {
e.printStackTrace();
}
The log output of above code is "Wed Jan 11 11:52:00 GMT+03:30 2017".
Is there anything wrong in my date format string?