procedure TForm1.Button1Click(Sender: TObject);
var
date1, date2: TDateTime;
difference: Integer;
begin
date1 := EncodeDate(2000, 06, 15); //Date 2000/06/15
date2 := EncodeDate(2000, 01, 01); //Date 2000/01/01
difference := trunc(date1) - trunc(date2);
ShowMessage(IntToStr(difference));
end;
Bewerten Sie diesen Tipp:
|
|
|