I am trying to do a search in my database where the purpose is to search between two dates entered by the user, and that it shows me all the values that are in that date range, but I am not able to go get the date in texbox
because it gives format error. I want to display the search result in a GridView
MySqlDataAdapter da = new MySqlDataAdapter("SELECT idConduta,valor_Lido FROM valores_conduta WHERE data_Leitura BETWEEN " + txtDataInicio.Text + " AND " + txtDataInicio.Text + "", conn);
da.SelectCommand.CommandType = CommandType.Text;
DataSet ds = new DataSet();//definir o objecto dadaset (ds)
//preencher os dados
da.Fill(ds);
GridView1.DataSource = ds;
GridView1.DataBind();