Title: calculate minute between 2 time
Question: how can i calculate minute between 2 time?
Answer:
procedure TForm1.Button1Click(Sender: TObject);
var
date1, date2 :TDateTime;
begin
date1:=strtodatetime('10/11/2001 21:32');
date2:=strtodatetime('10/10/2001 19:30');
ShowMessage(inttostr(trunc(date1-date2)*24*60 + strtoint(formatdatetime('h',date1-date2))*60 + strtoint(formatdatetime('n',date1-date2))));
end;