Current location - Loan Platform Complete Network - Big data management - How can I search for the desired data in C# based on the time period (user input start and end time) in asp.net. Thanks for your help.
How can I search for the desired data in C# based on the time period (user input start and end time) in asp.net. Thanks for your help.
sql="select **** from *** where condition ";

sql += string.Format("and Date >='{0}'", dateTimePicker_low.Value.ToShortDateString());

sql += string.Format("and Date <='{0}'", dateTimePicker_high.Value.ToShortDateString());

Execute the sql statement below to return the result.

dateTimePicker_low, dateTimePicker_high are two dateTimePicker controls. It is used to select the time