I am trying to develop an android application, regarding with that I have got some data from server.
Here I need to convert a date which comes in the given format "2013-12-31T15:07:38.6875000-05:00" I need to convert this in to a date object or a calendar object how can we do this?
I have tried with code given below. But it doesn't reach my expectation
String dateString="2013-12-31T15:07:38.6875000-05:00";
Date date = null;
DateFormat df = new SimpleDateFormat("yyyy-MM-dd hh:mm a");
try {
date = df.parse(dateString);
} catch (ParseException e) {
e.printStackTrace();
}
return date;