我要查询一段时间内是否有数据
begintime endtime
10:00:00 11:00:00
11:00:00 13:00:00
我要查询在这些时间段内,比如说在(10:00:00-11:00:00)或是在(11:00:00-13:00:00)是否有数据该怎么查????
sql.add('where begintime>='+strtotime(trim(edit1.text))+
begintime endtime
10:00:00 11:00:00
11:00:00 13:00:00
我要查询在这些时间段内,比如说在(10:00:00-11:00:00)或是在(11:00:00-13:00:00)是否有数据该怎么查????
sql.add('where begintime>='+strtotime(trim(edit1.text))+
解决方案 »
- 求SQL语句(MS Server 2000)把一表中一列数据复制到另外一表中的列
- 多线程,同时触发事件问题
- 这是什么问题?
- 需要将一个文本文件编译在一个程序中,使用时只看到一个工程文件,并可以让程序进行读取和操作
- 如何重画stringgrid标题栏?
- 用adotable可以不让DBGRID自动提交记录
- 有关delphi的数据库连接问题
- Object Pacscal基础问题
- 我用BDE连接PARADOX表,如何对table表排序,没有索引,不采用query表?
- 谁能提供一些关于做学校管理系统的有关例子(用delphi编的)
- 为何按日期时间查询ACCESS数据库时DELPHI报错呢?
- 急干求(时间查询SQL语句)
ycn12345(leon) 用file函数该怎么做啊,能说得详细点吗?
在网上可以找到例子的...
sFilter := TMakeFilterUnit.MakeFilter_DateScope(sFilter, '时间表', pckHTSJ1.Date, pckHTSJ2.Date)
str1,str2 : string;
把时间改成字符型吧
str1 := 10:00:00;
str2 := 11:00:00;
AdoQuery1.sql.add('select 字段 from 表');
AdoQuery1.sql.add('where begintime>= :begintime and endtime <= :endtime');
AdoQuery1..Parameters.ParamByName('begintime').Value := str1;
AdoQuery1..Parameters.ParamByName('endtiem').Value := str2;
datetimetostr(bgndate)+' and '+datetimetostr(endDate)
begin_time end_time
10:00:00 11:00:00
11:00:00 13:00:00
sql语句:
SELECT *
FROM chamber
WHERE (begin_time >= '9:00:00')
查不出数据呢?字段类型是datetime类型的