title: Conversion failed when converting datetime from character string ASP.NET
body: <p>I get a <code>Conversion failed</code> error when converting <code>DateTime</code> from character string, any help?</p>
  
  <pre><code>sqlcon.Open();
  sqlcmd = new SqlCommand("select [Uzsak_Nr],[Preke],[Uzsak_Kiekis],[Gaut_Kiekis],[MyDate],[Gaut_Data] from emp where MyDate between '" + TextBoxData1  + "'  and  '" + TextBoxData2 + "' ", sqlcon);
  da = new SqlDataAdapter(sqlcmd);
  da.Fill(dt);
  GridViewRodyti.DataSource = dt;
  GridViewRodyti.DataBind();
  sqlcon.Close();
  </code></pre>