11-05-2013, 04:33 PM
وعليكم السلام ورحمة الله تعالى وبركاته.
كود :
procedure TForm1.Button3Click(Sender: TObject);
var
Date1, Date2, DateD : TDateTime;
HH, MM, SS, MS: Word;
begin
Date1 := StrToDateTime('21/02/2010 04:32:50');
Date2 := now;
DateD := Date2 - Date1;
DecodeTime(DateD , HH, MM, SS, MS);
HH := HH + (24 * Round(DateD ));
Showmessage('الفرق بين التاريخين هو : ' + inttostr(HH) + 'ساعة ' + inttostr(MM) +
' دقيقة'+ inttostr(SS) +' ثانية '+ inttostr(MS)+' جزئ من الألف ');
end;
