I am able to change the my date Format 2014-12-09 to MMM dd,yyyy(Dec 09,2014 Like this.) But It Display Jan 09,2014 instead of Dec 09,2014. How to display Dec 09,2014? Please Guide me.
My Code is,
String strStartDate = "2014-12-09";
readFormat = new SimpleDateFormat("yyyy-mm-dd");
writeFormat = new SimpleDateFormat("MMM dd,yyyy");
try {
startDate = readFormat.parse(strStartDate);
} catch (ParseException e) {
e.printStackTrace();
}
viewHolder.txtStartDate
.setText(writeFormat.format(startDate));
Thanks in advance.