java - Unparsable Date with colon-separated timezone -
i'm trying parse string
2014-04-04t14:28:38+02:00
it should iso 8601 format. can't parse correct date. i've tried following:
string example = "2014-04-04t14:28:38+02:00" public final static simpledateformat df = new simpledateformat("yyyy-mm-dd't'hh:mm:ssz") date tempdate = df.parse(example)
but message "unparseable date" can not change example because it's value webservice.
could there probleme "+02:00" instead of "+0200" ?
thanks lot
starting java7, handle +02:00, can use following format:
"yyyy-mm-dd't'hh:mm:ssxxx"
this can seen in simpledateformat documentation
Comments
Post a Comment