建议你返回相减后的天数吧。// showmessage(DateToStr(now)+' '+DateToStr(FileDateToDateTime(I))+' '+inttostr(trunc(now-FileDateToDatetime(I))));//注释掉
button2.Caption :=inttostr(trunc(now-FileDateToDatetime(I)));
button2.Caption :=inttostr(trunc(now-FileDateToDatetime(I)));
// showmessage(DateToStr(now)+' '+DateToStr(FileDateToDateTime(I))+' '+inttostr(trunc(now-FileDateToDatetime(I))));//注释掉
button1.Caption :=datetostr(now-FileDateToDatetime(I));