title: Varchar to Datetime format
body: <p>I need to convert my Registrationdate(varchar)column in Table1 to Registrationdate(datetime)format in Table2. I need to use that in insertion code.</p>
  <pre><code>Insert Full_patient_reg (Patient_id,RegistrationDate,PatientName)
      select a.PATIENT_ID,a.REGISTRATIONDATE,a.PATIENTNAME from hinai_patient a
      where a.PATIENT_ID not in
      (select Patient_id from Full_patient_reg where a.PATIENT_ID=Patient_id)
  </code></pre>
  <p>It cause the error like 'The conversion of a varchar data type to a datetime data type resulted in an out-of-range value.'</p>
  <p>Please suggest a code which act in insert code.</p>
  <pre><code>Dateformats (varchar)
  2011-08-01 00:00:00
  2000-11-16 07:39:44
  2020-06-06 07:51:42.644
  2020-05-26 06:55:38.08
  </code></pre>