title: Java Converting String(day/month/year) format to Date
body: <p>I am trying to conver the string to a date</p>
  
  <pre><code>String date = "12/31/2012";
          SimpleDateFormat sdf = new SimpleDateFormat("yyyy-mm-dd");
          try {
              Date parse = sdf.parse(date);
              System.out.println(parse);
          } catch (ParseException ex) {     
              ex.printStackTrace();
          }
  </code></pre>
  
  <p>But it appears to me that it is having an <code>Exception</code>. of <code>ParseExpception</code>. why is that? I want to generate a date for <code>12/31/2012</code></p>