hi frnds i got some data from api service it contains date also the date format is 2013-09-06T14:15:11.557
which format it is??, how we can covert this date into 2013 sept 06 2:15
i used these 2 methods for coverting them to my date format
public static Date stringToDate(String dateString)
{
Date date = null;
DateFormat df = new SimpleDateFormat(Constants.DATE_FORMAT_WITHOUT_TIME);
try {
date = df.parse(dateString);
} catch (ParseException e) {
e.printStackTrace();
}
return date;
}
and
public static String FormatDate(String dateString)
{
String s="";
Date date = stringToDate(dateString);
s = date.getDate()+" "+monthname[date.getMonth()+1]+" "+(date.getYear()+1900);
return s;
}
and this is my date format constant public static final String DATE_FORMAT_WITHOUT_TIME = "yyyy-MM-dd";
but it the parsing doesn't works correctly