DBGrid中的记录放到checklistbox中 可是总是报错:could not convert variant of type(string) into type (date)
dbgrid中的记录有个字段是日期的:2007-12-12
procedure TForm1.Button1Click(Sender: TObject);
begin
while not OraQuery1.Eof do
begin
checklistbox1.Items.add('<'+oraquery1.Fields[0].Value+'><'+oraquery1.Fields[1].Value+'><'+oraquery1.Fields[2].Value+'><'+oraquery1.Fields[3].Value+'><'+datetostr(oraquery1.Fields[4].Value+'>'));
oraquery1.Next;
end;
end;
其中oraquery1.Fields[4]是日期型 我试了:+strtodate(datetostr(oraquery1.Fields[4].Value+'>')
datetostr(datetostr(oraquery1.Fields[4].Value+'>')
都不行
高手指点啊!!!我还在加班中 在线等!!
dbgrid中的记录有个字段是日期的:2007-12-12
procedure TForm1.Button1Click(Sender: TObject);
begin
while not OraQuery1.Eof do
begin
checklistbox1.Items.add('<'+oraquery1.Fields[0].Value+'><'+oraquery1.Fields[1].Value+'><'+oraquery1.Fields[2].Value+'><'+oraquery1.Fields[3].Value+'><'+datetostr(oraquery1.Fields[4].Value+'>'));
oraquery1.Next;
end;
end;
其中oraquery1.Fields[4]是日期型 我试了:+strtodate(datetostr(oraquery1.Fields[4].Value+'>')
datetostr(datetostr(oraquery1.Fields[4].Value+'>')
都不行
高手指点啊!!!我还在加班中 在线等!!
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货