日期:2014-05-17  浏览次数:20738 次

有两个dateTimePicker控件,选择了以后按时间段查询数据库中数据,where的条件应该怎么写
有两个dateTimePicker控件,选择了以后按时间段查询数据库中数据,where的条件应该怎么写

------解决方案--------------------
"where dt between '"+ dateTimePicker1.Value.ToShortDateString()+"' and '"+ dateTimePicker2.Value.ToShortDateString()+"'"