c#如何让写SQl语句查寻dateTimePicker1 dateTimePicker2之间的时间段 10
stringsql="SELECTdingg.LmAS路线名称,dingg.PriceAS单价,dingg.DateAS订购日起,dingg.LhaoAS流水号,ding...
string sql = "SELECT dingg.Lm AS 路线名称, dingg.Price AS 单价, dingg.Date AS 订购日起, dingg.Lhao AS 流水号, dingg.Num AS 数量, xl.Chuf AS 出发地点, xl.Tuj AS 途径景点, xl.Chut AS 出团计划, xl.Date AS 出团时间 FROM dingg INNER JOIN xl ON dingg.IDD = xl.ID WHERE (xl.Youx = N'是') and (xl.Date between '"+dateTimePicker1.Value.ToString("yyyy-MM-dd")+"' and '"+dateTimePicker2.Value.ToString("yyyy-MM-dd")+"')";这是我写的,大家看一下,Date字段是datetime 数据类型!
展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询