I want to filter my datagrid view in my winform with a date range.
I have 2 label with StartingDate(lblStart) and EndingDate(lblEnd) which is called from the datepicker on another form.
Filter = "(DATE >= '" + Convert.ToDateTime(lblStart.Text).ToString("dd/MM/yyyy") + "' and DATE <= '" + Convert.ToDateTime(lblEnd.Text).ToString("dd/MM/yyyy") + "')";
And this code does not works. Can someone tell me that is it any wrong on my code, or any changes need to be done on datagridview in order make the filter works.
My DATE column data is in the format of dd/MM/yyyy which loaded from my SQL db.
Thanks