Unparseable MMM-dd-yyyy
<p>I will be direct with my question. I am wondering why I can't parse a fromat MMM-dd-yyyy into yyyy-MM-dd (java.sql.Date format)? Any suggestion on how I am going to convert a String into a format of (yyyy-MM-dd)?</p>

<p>Here is the code:</p>

<pre><code>public DeadlineAction(String deadline){
        putValue(NAME, deadline);
        deadLine = deadline;
        SimpleDateFormat formatter = new SimpleDateFormat("yyyy MM dd");
        try {
            finalDate = (Date) formatter.parse(deadLine);           
        }catch(ParseException e) {
            JOptionPane.showMessageDialog(null, e.getMessage(),"Error",JOptionPane.ERROR_MESSAGE);
        }
    }
</code></pre>

<p>Thank you</p>