x:=date-table1.fields[3].value;//x是string型,field[3].value是Date型
y:=floattostr(strtoint(x)*table1.fields[4].asinteger);
panel2.caption:=combobox1.text+'为:'+''''+edit1.text+''''+'的客户住了'+x+'天,'+'应付金额:'+y+'元人民币。'+'显示全部记录请按'+''''+'刷新'+'''';本代码是想计算出宾馆客户入住的天数,即用系统日期-客户入住日期=入住天数
请问代码错在哪里?怎么实现?