W
wishme1
Unregistered / Unconfirmed
GUEST, unregistred user!
DELPHI连接ACCESS数据库,怎样处理时间,比入有字段incomedate,为日期型
要取年,月,日,用paradox7表可如下写:
query1.sql.clear;
query1.sql.add('select * from mytable');
query1.sql.add('where extract(year from incomedate)=:incomeyear');
query1.ParamByName('incomeyear').asinteger:=strtoint(edit1.text);
query1.open;
改成ACCESS库就不行了,应该是处理时间的问题,请指教!
要取年,月,日,用paradox7表可如下写:
query1.sql.clear;
query1.sql.add('select * from mytable');
query1.sql.add('where extract(year from incomedate)=:incomeyear');
query1.ParamByName('incomeyear').asinteger:=strtoint(edit1.text);
query1.open;
改成ACCESS库就不行了,应该是处理时间的问题,请指教!