This is the format i am getting from RSS Feed so how to convert it to date object in android?
2014-02-26T08:27:10.087-05:00
Feb 26 2014 8.27 AM -5.00 GMT
This is the format i am getting from RSS Feed so how to convert it to date object in android?
2014-02-26T08:27:10.087-05:00
Feb 26 2014 8.27 AM -5.00 GMT
It's worth noting that your input strings seems to be really strange when it comes to timezone offset - there shouldn't be the colon. In any case, the right way of dealing with this is to use SimpleDateFormat
class:
String input = "2014-02-26T08:27:10.087-0500"
SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ");
Date date = formatter.parse(input);
Have a look at the linked documentation to understand the patterns - then you just need to create patterns matching your input.