android - How can I parse a seemingly standard Timestamp in Java? -
very simple task. want reformat timestamp sent me service format of wed, 26 jan 2011 22:27:09 +0000.
string format = "eeee; mmmm d, yyyy"; string timestamp = "wed, 26 jan 2011 22:27:09 +0000"; date date = new simpledateformat(format).parse(timestamp); log.d("test", date.tostring());
i haven't been able find formats .parse()
method allow 1 throws parseexception
.
have tried:
string format = "eee, dd mmm yyyy hh:mm:ss z";
when use format parse test string, (in central time):
wed jan 26 16:27:09 cst 2011
Comments
Post a Comment