You can use the below sql query to populate data from a table for between 2 dates using datetimepicker in c#:
"select * from Table_Name where column1_name>='" +dateTimePicker1.Value.ToString("yyyyMMdd") + "' and column2_name<='" + dateTimePicker2.Value.ToString("yyyyMMdd") + "' "
this will check only string value not data type value...............
ReplyDelete