title: How to insert date value from jdatechooser to database table
body: <pre><code> private void jButton5ActionPerformed(java.awt.event.ActionEvent evt) {                                         
          String G_ID=gIDText.getText();
          String G_Title=(String) titleCombo.getSelectedItem();
          String FName=fNameText.getText();
          String SName=sureNameText.getText();
          String Sex=(String) genderCombo.getSelectedItem();
          String dob=(JTextField)dobDte.getDateEditor().getUiComponent().getText();//error
          int age=Integer.parseInt(ageText.getText());
          String country=contactText.getText();
          String nationality=nationText.getText();
          String ZipCode=zipCodeText.getText();
          String email=mailText.getText();
          String PassportNo=passportText.getText();
          String IssuedDate=(JTextField)issDte.getDateEditor().getUiComponent().getText();//Error
          String ExpiryDate=(JTextField).getDateEditor().getUiComponent().getText();//error
          String PIDNo=pidText.getText();
          int ContactNo=Integer.parseInt(contactText.getText());
  
          Guest guest=new Guest(G_ID,G_Title,FName,SName,Sex,dob,age,country,nationality,ZipCode,email,PassportNo,IssuedDate,ExpiryDate,PIDNo,ContactNo);
          try {
                  boolean isAdded=GuestController.addGuest(guest);
                  if (isAdded) {
                      JOptionPane.showMessageDialog(NewGuest.this,"Registered Success !");
                  }else{
                      JOptionPane.showMessageDialog(NewGuest.this,"Unable to Register ! !");
              }
      }catch(SQLException | ClassNotFoundException ex){
      JOptionPane.showMessageDialog(NewGuest.this,ex.getMessage());
  }
  }                                     
  </code></pre>
  
  <blockquote>
    <p>(mvc)I have tried to insert date from jdatechooser to mysql database,but its shows error,please help me to fix this and if can please retype the correct code for me</p>
  </blockquote>