I want to define a template for Java SimpleDaterFormat to parse existing strings.
Existing dates are as follows: 2011-05-02T13:40:00+02:00
.
I tried with different templates, but I got ParseExceptions. The problem is the time zone format.
Printing a template in Java:
yyyy-MM-dd'T'HH:mm:ssZ
yyyy-MM-dd'T'HH:mm:ssZ
But how can I get
- ???
2011-05-02T13:40:00+02:00
I am using Java 6 and not Java 7.
source share