title: Unparseable date: "yyyy-MM-dd"
body: <p>I'm trying to send a date I picked with jDateChooser to a MySQL database, but it's giving me the following error: </p>
  
  <pre><code>Dec 30, 2015 5:23:29 PM werkstukcp3.swing.WerkstukGUI btnPatCreateActionPerformed
  SEVERE: null
      java.text.ParseException: Unparseable date: "yyyy-MM-dd"
  </code></pre>
  
  <p>I've been looking around on StackOverflow in order to resolve this but everything I try just gave me another error.</p>
  
  <p>I've got the following code for my button:</p>
  
  <pre><code>private void btnPatCreateActionPerformed(java.awt.event.ActionEvent evt) {                                             
      // TODO add your handling code here:
      int patientId = 12;
      String voornaam = txtPatVoornaam.getText();
      String achternaam = txtPatAchternaam.getText();
      int kamer = Integer.parseInt(txtPatKamer.getText());
      String departement = txtPatDep.getText();
      String campus = txtPatCampus.getText();
  
      DateFormat sdf = new SimpleDateFormat("yyyy-MM-dd", Locale.ENGLISH);
      sdf.setTimeZone(TimeZone.getTimeZone("GMT+1"));
  
      Date parse1 = null;
      try {
          parse1 = sdf.parse(datePatAankomst.getDateFormatString());
      } catch (ParseException ex) {
          Logger.getLogger(WerkstukGUI.class.getName()).log(Level.SEVERE, null, ex);
      }
      java.sql.Date aankomstdatum = new java.sql.Date(parse1.getTime());
  
      Date parse2 = null;
      try {
          parse2 = sdf.parse(datePatVertrek.getDateFormatString());
      } catch (ParseException ex) {
          Logger.getLogger(WerkstukGUI.class.getName()).log(Level.SEVERE, null, ex);
      }
      java.sql.Date vertrekdatum = new java.sql.Date(parse2.getTime());
  
      Patient nieuwePatient = new Patient(patientId, voornaam, achternaam, kamer, departement, campus, aankomstdatum, vertrekdatum);
      PatientDAO.voegPatientToe(nieuwePatient);
  }
  </code></pre>
  
  <p>Thanks in advance!</p>