dt2 = ds.Tables[0].Select().Where(p => (Convert.ToDateTime(p["SignupDate"]) >= Convert.ToDateTime(txtFMinDate.Text)) && (Convert.ToDateTime(p["SignupDate"]) <= Convert.ToDateTime(txtFMaxDate.Text))).CopyToDataTable();
I want Above statement in the below format(This is not working).
DataView dataView = ds.Tables[0].DefaultView;
string where="";
where = "SignupDate >='" + Convert.ToDateTime(txtFMinDate.Text) + "'" + " AND SignupDate <='" + Convert.ToDateTime(txtFMaxDate.Text) + "'";
dataView.RowFilter = where;
DataTable dt = dataView.ToTable();
Filterds.Tables.Add(dt);
So, i want the perfect format.