VB中dtpicker日期时间如何相加? 25
有四个dtpicker控件,两个显示data,两个显示time,两两组合成两个时间点,即:(dtpicker1.value+dtpicker3.value,dtpicke...
有四个dtpicker控件,两个显示data,两个显示time,两两组合成两个时间点,即:(dtpicker1.value+dtpicker3.value,dtpicker2.value+dtpicker4.value)。现已经连上数据库,要查询介于这两时间点之间的某些数据,该用什么样的SQL语句呢?
我用如下语句:
"select * from (select * from td0802 where " + " f01>to_date('" + CStr(DTPicker1.Value + DTPicker3.Value) + "','yyyy-mm-dd hh24:mi:ss')and f01< to_date('" + CStr(DTPicker2.Value + DTPicker4.Value) + "','yyyy-mm-dd hh24:mi:ss')"
可以吗? 展开
我用如下语句:
"select * from (select * from td0802 where " + " f01>to_date('" + CStr(DTPicker1.Value + DTPicker3.Value) + "','yyyy-mm-dd hh24:mi:ss')and f01< to_date('" + CStr(DTPicker2.Value + DTPicker4.Value) + "','yyyy-mm-dd hh24:mi:ss')"
可以吗? 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询