SimpleDateFormat Unparseable date Exception
<p>I am trying to parse datetime string with SimpleDateFormat.parse() but I keep receiving Unparseable date exceptions.</p>

<p>Here is the date format I am trying to parse: <code>2011-10-06T12:00:00-08:00</code></p>

<p>Here is the code I am using:</p>

<pre><code>try {
    String dateStr = "2011-10-06T12:00:00-08:00";
    SimpleDateFormat dateParser = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ");
    SimpleDateFormat dateFormatter = new SimpleDateFormat("MMM d, yyyy");
    Date date = dateParser.parse(dateStr);
    System.out.println(dateFormatter.format(date));         
} catch(Exception e) {
    System.out.println(e.getMessage());
}
</code></pre>

<p>Which returns this error: <code>java.text.ParseException: Unparseable date: "2011-10-06T12:00:00-08:00"</code></p>

<p>As far as I know this is the correct way to use the SimpleDateFormat class but I'm not fluent in Java so I could be mistaken.  Any one know what my issue is?</p>
