假设,我有一张员工表Access的(员工编号....合同结束....)有合同结束的字段,为日期/时间型(短日期)button1:我想查询合同接受到某一天的员工,button2:查询合同到某一个月的员工,
该怎么实现,我上次看过别人贴出来的文章,我也学着写了:
button1onclick
with adoquery1 do
begin
  close;
  sql.clear;
  sql.add('select * from table1 where 合同结束= '+getdate());
end;button2onclick
with adoquery1 do
begin
  close;
  sql.clear;
  sql.add('select * from table1 where month(合同结束)= '+month(getdate()));
end;
提示错误:表达试中getdate()函数为定义!我知道我以上的写法有很多错误,,我只想表达我的意思给大虾们,,能帮小第写一下完整的代码吗??
谢谢!!