Wrote below code for trying to convert date time from the value in double quotes but fails with parse exception. please advise
public static void main(String args[]) {
try {
DateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.S Z");
Date date = format.parse("2016-02-03 10:39:29.099545 -8:00");
} catch (ParseException pe) {
// TODO: Add catch code
pe.printStackTrace();
}
}
this fails with parse exception.
further more my final output should look like below format: 2016-01-26T12:07:41-08:00