Comparing date in C # state with oledb database
I have to take 2 values from DateTimePicker and then compare their values in the database.
Code:
string dt_start = dateTimePicker1.Value.ToShortDateString();
string dt_end = dateTimePicker2.Value.ToShortDateString();
string mySelectQuery = "Select * from " + out_table + " WHERE [Date] Between " + dt_start + " and " + dt_end + " ";
It doesn't show any error, but I am not getting output values.
+3
source to share