vipin saini

vipin saini

  • NA
  • 88
  • 0

Grid View Problems date time problem

Aug 4 2010 2:01 AM

d =
DateTime.Now.ToString("dd/mm/yyyy");
cmdd1 =
new SqlCommand(" ", conn);
cmdd1.CommandText =
"select * from today where '" +
"@date"+
"' between fdate and tdate order by id desc ";
cmdd1.Parameters.AddWithValue(
"@date", Convert.ToDateTime(d));
SqlDataAdapter adapter1 = new SqlDataAdapter(cmdd1);
// Fill the DataSet.
DataSet ds1 = new DataSet();
adapter1.Fill(ds1,
"today");
// Perform the binding.
GridView1.DataSource = ds1;
GridView1.DataBind();
in which fdate and tdate in datetime database plz it is not working

Answers (1)