Parsing ISO-8601 DateTime in java -
i have trouble parsing date time in java, have strange date time format. how can parse 2013-04-03t17:04:39.9430000+03:00
date time in java format dd.mm.yyyy hh:mm
in java?
the "strange" format you're speaking of iso-8601 format, used. can use simpledateformat reformat in way please:
simpledateformat informat = new simpledateformat("yyyy-mm-dd't'hh:mm:ssz"); datetime dtin = informat.parse(datestring}); //where datestring date in iso-8601 format simpledateformat outformat = new simpledateformat("dd.mm.yyyy hh:mm"); string dtout = outformat.format(dtin); //parse datetime object if need interact such
will give format mentioned.
Comments
Post a Comment