请教!!!关于DateTimePicker的问题....
有两个DateTimePicker:DateTimePicker1和DateTimePicker2. 我想把表Table1中的字段( "日期 ")处在两个DateTimePicker的记录搜索出来.sql语句要怎样写呢?
[解决办法]
有两个DateTimePicker:DateTimePicker1和DateTimePicker2. 我想把表Table1中的字段( "日期 ")处在两个DateTimePicker的记录搜索出来.sql语句要怎样写呢?
string sql = "select * from Table1 where 日期 between '{0} ' and '{1} ' ";
sql = string.Format(sql,DateTimePicker1.Value, DateTimePicker2.Value);