Can u pls tell me is this query is right or wrong for
serach data between two dates:
from and to date is select by date pickers:
sql = "SELECT * FROM dheelabs_remedies.logs where calltime
between '" + FromDate.Text + "' and '" + ToDate.Text + "' and remarks='" + drop_filter.SelectedItem + "' order by id desc";
Help me
Sql query - right or wrong?
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.

Satyapriya NayakRank #47 · 31.5K reputationPosted Jun 27, 2012, 1:18 AM EDT
Try
sql = "SELECT * FROM dheelabs_remedies.logs where calltime
between '" + FromDate.Value.Date.ToString()+ "' and '" + ToDate.Value.Date.ToString() + "' and remarks='" + drop_filter.SelectedItem + "' order by id desc";
Thanks