我数据库用oracle9i
select rwh,cx,vin,sxrq from ZZP_ZPJHTZsxrq查询结果为:2007-6-14 18:39:14
我用delphi查不到它
sql.text:='select rwh,cx,vin,sxrq
from ZZP_ZPJHTZ
where sxrq = to_date('''+Label2.Caption+''',''YYYY-MM-DD'')';又没办法呀???
select rwh,cx,vin,sxrq from ZZP_ZPJHTZsxrq查询结果为:2007-6-14 18:39:14
我用delphi查不到它
sql.text:='select rwh,cx,vin,sxrq
from ZZP_ZPJHTZ
where sxrq = to_date('''+Label2.Caption+''',''YYYY-MM-DD'')';又没办法呀???
insert into t3
select to_date( '2003-03-03 11:11:11','yyyy-mm-dd HH24:MI:SS') from dual;
--执行查询
select * from t3 where ctime=to_date( '2003-03-03 11:11:11','yyyy-mm-dd HH24:MI:SS');
--查询结果
2003-3-3 11:11:11
select rwh,cx,vin,sxrq from ZZP_ZPJHTZ
数据库存储形式为:2007-6-14 18:39:14
我用delphi查不到它
sql.text:='select rwh,cx,vin,sxrq
from ZZP_ZPJHTZ
where sxrq = to_date('''+Label2.Caption+''',''YYYY-MM-DD'')';
2Label2.Caption:=‘2007-6-14’
我想把2007-6-14的记录全查出来,有办法吗???
where sxrq >= '2007-6-14' and sxrp < dateadd(dd,1,'2007-6-14')也可以用类型转换
select rwh,cx,vin,sxrq from ZZP_ZPJHTZ
where Convert(varchar(10),sxrp,102) = '2007-6-14'
from ZZP_ZPJHTZ
where sxrq like to_date('''+Label2.Caption+''',''YYYY-MM-DD'')';
from ZZP_ZPJHTZ
where sxrq >=to_date('''+Label2.Caption+''','yyyy-mm-dd hh24:mi:ss')) and sxrq<=
to_date('''+Label2.Caption+''','yyyy-mm-dd hh24:mi:ss') +1)之间的数据就可以了