title: how to format date and time from JDateChooser to mysql datetime column
body: <p>I am trying yo store current date and time from JDateChooser to mysql database, but it inserts only todays date and current time is 00:00:00</p>
  
  <pre><code>  java.util.Date dt1,dt2;     
    String n=name.getText();
    String i=id.getText();
    SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
    dt1=jDateChooser1.getDate();
    dt2=jDateChooser2.getDate();
    String strdtver1=(String) sdf.format(jDateChooser1.getDate());
    String strdtver2=(String) sdf.format(jDateChooser2.getDate());
  
    try {
       Class.forName("com.mysql.jdbc.Driver");
       Connection con= (Connection) DriverManager.getConnection("jdbc:mysql://localhost:3306/testing","root","");
      Statement stmt=con.createStatement();
      String sql="Insert into ss values('"+(n)+"','"+(strdtver1)+"','"+(strdtver2)+"','"+(i)+"');";
      stmt.executeUpdate(sql);
      JOptionPane.showMessageDialog(this, "RECORD ENTERED SUCCESSFULLY");
  
    } catch(Exception e) {
        JOptionPane.showMessageDialog(this,e.getMessage());
    }
  </code></pre>
  
  <p>It is a program to store check in &amp; check out date and time.
  The datatype in mysql is datetime for  Check_in and Check_out.
  The data entered in my sql at column Check_in is  2014-10-27 00:00:00. The current date is correct but i want to insert current time instead of 00:00:00.Please help me.</p>