title: Java: Convert date 2011-Jan-01 to format of dd-MM-yyyy
body: <p>I need to convert date (2011-Jan-01) to any of the simpledateformats.</p>
  
  <p>The eclipse designer uses Java 7.</p>
  
  <pre><code>    String pDate = obj.getJSONArray("product").getJSONObject(i).getString("createdDate");
      //"2011-Jan-01" - date format.
      SimpleDateFormat format = new SimpleDateFormat("yyyy-MMM-dd HH:mm:ss");
      try {
          Date fDate = format.parse(pDate);
          System.out.println("jsonDate: " + fDate);
      } catch (ParseException e) {
          // TODO Auto-generated catch block
          e.printStackTrace();
      }
      System.out.println("pDate: " + pDate);//"2011-Jan-01"
  
  
              errors:
              error:java.text.ParseException:Unparseable date:"2011-Jan-01"
              error: at java.text.DateFormat.parse(DateFormat.java:348)
  </code></pre>
  
  <p>I'm getting errors above.</p>