title: How to parse date string EEE MMM dd to yyyy-MM-dd in java
body: <p>I'm having the date in this pattern <strong>EEEEE MMMMM yyyy HH:mm:ss.SSSZ</strong>,  I would like to convert this to yyyy-MM-dd format in java, I tried below approach but I'm getting this exception <code>java.text.ParseException: Unparseable date:</code></p>
  
  <pre><code>   SimpleDateFormat formatter = new SimpleDateFormat("dd-MMM-yyyy");
      String dateInString = "Sun Oct 01 00:00:00 EDT 2017";
  
      try {
  
          Date date = formatter.parse(dateInString);
          System.out.println(date);
          System.out.println(formatter.format(date));
  
      } catch (ParseException e) {
          e.printStackTrace();
      }
  </code></pre>
  
  <p>Can someone please help me to resolve this?</p>
  
  <p>Thanks.</p>