I need to convert this timestamp string to a Java Date object
2014-04-03T14:02:57.182+0200
How do I do this? How do I handle the time offset included in the timestamp
You can use this code:
String strdate = "2014-04-03T14:02:57.182+0200";
Date date = new SimpleDateFormat("yyyy-mm-dd'T'HH:mm:ss.SSSZ").parse(strdate);
System.out.println(date);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With