Between Query in SQL
Between SQL Query Using Compare Two Fields Like Two Dates Using in Asp.Net C#.
DEMO
SQL Query Using C#
Between SQL Query Using Compare Two Fields Like Two Dates Using in Asp.Net C#.
DEMO
SQL Query Using C#
protected void Button1_Click(object sender, EventArgs e)
{
dbcon();
SqlCommand cmd = new
SqlCommand("Select report_date as[Dates],name as [Names] from dates where report_date between '"+txtFrom.Text+"' and '"+txtTo.Text+"'",con);
SqlDataAdapter adp = new SqlDataAdapter(cmd);
DataTable dt = new DataTable();
adp.Fill(dt);
SqlDataReader rd = cmd.ExecuteReader();
if (rd.Read())
{
GridView1.DataSource = dt;
GridView1.DataBind();
}
0 comments:
Post a Comment