error in show data by date wise in grid
<p>i have tried to show a data by date wise but i didn't get the answer exactly, please help me..</p>

<pre><code>public void gettoday()
    {
        con.Open();
        {
            string strview = @"select MRNO,MaterialCode,Description,Specification,
                              Category as Cat,Source as Sor,Population as Pop, StockInStores as Stock, MRRating as Rating,PreparedBy,PreparedDate,CheckedBy,CheckedDate,ApprovedBy,ApprovedDate  
                         from tbl_KKSMaterialRaise 
                         where PreparedDate between (getdate()-1) and (getdate()+1)";
            SqlCommand cd = new SqlCommand(strview, con);
            SqlDataReader reader = cd.ExecuteReader();

            GridView1.DataSource = reader;
            GridView1.DataBind();
        }
        con.Close();


    }
</code></pre>
