C#求两个DataTimePicker控件之间的时间段
想要求出大于等于dateTimePicker1,小于dateTimePicker2的时间段,为什么查不出来?SQL代码如下:stringsql="select*fromb...
想要求出大于等于dateTimePicker1,小于dateTimePicker2的时间段,为什么查不出来?SQL代码如下:
string sql = "select * from book where createTime >=" + this.dateTimePicker1.Value.ToString("yyyy-MM-dd")+"and createTime <" + this.dateTimePicker2.Value.ToString("yyyy-MM-dd"); 展开
string sql = "select * from book where createTime >=" + this.dateTimePicker1.Value.ToString("yyyy-MM-dd")+"and createTime <" + this.dateTimePicker2.Value.ToString("yyyy-MM-dd"); 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询