Tuesday, 15 November 2011
Home »
Tips and Trick Delphi
» How to calculate the day on different dates.
How to calculate the day on different dates.
To Share | Tuesday, 15 November 2011
Function declaration:
differencedate function (TglOld, TglNew: TDate): Integer;
begin
Result: = trunc (TglNew - TglOld);
end;
Example of implementation:
procedure TForm1.Button1Click (Sender: TObject);
begin
Edit1.Text: = IntToStr (differencedate (DateTimePicker1.Date, DateTimePicker2.Date));
end;
No comments:
Post a Comment