1
I’m trying to do a search in my database where the goal is to search between two dates entered by the user, and that it shows me all the values that are in this date range, but I’m not able to get the date on texbox
because it gives format error. I want to present 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();
What is the format error?
– Oralista de Sistemas
Is this what you want? http://answall.com/questions/11065/converter-data-dd-mm-aaaaaa-para-formato-8601-aaaaaamm-dd
– Maniero