title: How change format date from jDateChooser?
body: <p>I want enter the start date and the deadline for a task in the database. 
  But the format that saves the database is this: Tue Apr 15 13:46:38 BST 2014
  I want in yyyy-MM-dd format.</p>
  
  <p>This is the code I use to write the data in the database:</p>
  
  <pre><code>public void addTask() {
      try {
          Taskt1 = new Task();
          t1.setIdTask(jTIdTask.getText());
          t1.setDescTask(jTDescTask.getText());
          t1.setDate(jDateChooserDare.getDate().toString());
          t1.setdeadline(jDateChooserDeadline.getDate().toString());
  
  
          TaskDao dao = new TaskDao();
          dao.Task(t1);
  
      } catch (SQLException ex) {
          Logger.getLogger(jTTask.class.getName()).log(Level.SEVERE, null, ex);
      }
  }
  </code></pre>
  
  <p>--------------Form-----------</p>
  
  <p><img src="https://i.stack.imgur.com/ozXfE.png" alt="enter image description here"></p>