title: Error ORA-01843 NOT A VALID MONTH When Trying to Insert
body: <p>I need to insert date from a <code>JTextField</code>, As following:</p>
  
  <pre><code>pst.setString (4, txt_date.getText());    
  </code></pre>
  
  <p>But leaves the error:  ORA-01843 NOT A VALID MONTH</p>
  
  <p>in oracle datatype is DATE (example: 5/30/2014)</p>
  
  <p>How to solve this?</p>
  
  <p>thanks  </p>
  
  <p>edit:</p>
  
  <pre><code>Connection conn = Connessione.ConnecrDb();
     Statement stmt = null;
     ResultSet emps = null;
  
     SimpleDateFormat formatter = new SimpleDateFormat("dd-mm-yyyy");
  String dateInString = "7-07-2014";
  
  try {
  
         java.util.Date date = formatter.parse(dateInString);
      System.out.println(date);
      System.out.println(formatter.format(date));
  
  } catch (ParseException e) {
      e.printStackTrace();
  }    
  </code></pre>
  
  <p>I add this befor a     try { insert ...etc    </p>