我定义的变量,a,b:integer;year,month,day:word;
decodedate(query1.FieldValues['jzrq'],year,month,day);
a:=month;
decodedate(datetimepicker1.date,year,month,day);
b:=month;
if a=b then
begin
....
end
else
begin
....
end;
现在的问题就是就算我把query1里的相应数据和datetimepicker1.date是同一天,程序也是执行A不等于B的那一部分,请问是哪出问题了?