title: problem in adding java date in MySQL?
body: <p>here is the code </p>
  
  <pre><code>String DateOfBirth[]=strDOB.split("/");
  Date dateOfBirth = new Date();
  dateOfBirth.setYear(Integer.parseInt(DateOfBirth[2].trim()));
  dateOfBirth.setMonth(Integer.parseInt(DateOfBirth[1].trim()));
  dateOfBirth.setDate(Integer.parseInt(DateOfBirth[0].trim()));
   java.text.SimpleDateFormat DateFormat = new java.text.SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
  strDOB = DateFormat.format(dateOfBirth);
   DBProcess.QueryExecuter("INSERT INTO patients(patient_id,first_name,last_name,middle_name,birth_dt) VALUES (\""+Double.parseDouble(strPatientID.trim())+"\",\""+strFirstname+"\",\""+strLastname+"\",\""+strMiddlename+"\",\""+strDOB +"\");");
  </code></pre>