第1个回答 2012-07-26
procedure TForm1.Button1Click(Sender: TObject);
var
DT:TDateTime;
h,m,s,ms:Word;
SumSecond:integer;
begin
DT:= strToDateTime('11:10:10');
DecodeTime(DT,h,m,s,ms);//分解小时,分钟,秒,毫秒。
SumSecond:= h*60*60 + m*60 + s; //计算
showmessage(intToStr(SumSecond));
end;