title: using comboboxes and textbox for date of birth
body: <p>I combined 2 text boxes and text box. Don't know how to convert the string to datetime. </p>
  
  <pre><code>string DOb  = $"{comboMM.SelectedValue}, {ComboDD.SelectedValue}, {txtYear.Text"";
  string Query = "Insert into dbo.membertable(Given_Names, Last_Name, passport_No, Ctry_Origin, gender, M_status, DOb,MarAnn, Phone_No,Email,branch,Unit,H_address,city,states,Country,famdfrd_Name,famfrd_Number,famfrd_rship) Values('" + txtnames.Text + "','" + txtFamilyname.Text + "','" + txtPassport.Text + "','" + txtCountry.Text + "','" + ComboGender.SelectedItem + "','" + ComboMStatus.SelectedItem + "','" + DateB.Value.ToShortDateString() + "','" +  MarAnn + "','" + txtPhoneNo.Text + "','" + txtEmailAdd.Text + "','" + ComboBranch.SelectedItem + "','" + ComboUnit.SelectedItem + "','" + txtAddress.Text + "','" + txtCity.Text + "','" + ComboState.SelectedItem + "','" + ComboCountry.SelectedItem + "','" + txtrelative.Text + "','" + TxtRphone.Text + "','" + txtRelationship.Text + "');";
  
  ConnectionStringSettings conSettings = ConfigurationManager.ConnectionStrings["PottersDB"];
  String connectionString = conSettings.ConnectionString;
  try
  {
  
      con = new SqlConnection(connectionString);
      con.Open();
      cmd = new SqlCommand(Query, con);
      dr  = cmd.ExecuteReader();
      MessageBox.Show("Member Successfully Added");
      Reset_Page();
      con.Close();
  }
  </code></pre>