title: Netbeans Database datetime issue
body: <p>The error message I'm getting when I compile this is "The syntax of the string representation of a datetime value is incorrect"</p>
  
  <p>When the date object is being passed in from the History ArrayList, it's format is '19-Apr-2013' </p>
  
  <p>I know the database's format is 'Year-Month-Day'. Is there any way for me to convert my date object to the correct format for the database?</p>
  
  <pre><code>for ( Patient p: pList )
  {
      patientInsertSQL = "Insert Into SHAUN.PATIENT VALUES (" + p.getPatientNum() +
          + ", '" + p.getPatientName() + "', '" + p.getPatientAddress() + "', '"
          + p.getPatientPhone() + "')";
      res = stmt.executeUpdate(patientInsertSQL);
      System.out.println(res);
      ArrayList&lt;History&gt; tempHistList = p.getHistory();
      String histSelect = "select * from SHAUN.HISTORY";
      result = stmt.executeQuery(histSelect);
      for ( History h: tempHistList )
      {
          historyInsertSQL = "Insert Into SHAUN.HISTORY VALUES (" + h.getHistID()
            + ", '" + h.getConditionName() + "', '" + h.getMedication() + "', '"
            + h.getDateOccured() + "', " + p.getPatientNum() + ")";
          res = stmt.executeUpdate(historyInsertSQL);
          System.out.println(res);
          //Loop Checker
          int i = 1;
          System.out.println("In the History Loop " + i);
          i++;
      }
      System.out.println("In the loop!");
  </code></pre>