把秒数转换成hh:mm:ss格式
function SecondToTime(a:integer):string;
begin
result:=timetostr(a/86400);
end;
或者:
Format('%-.2d:%-.2d:%-.2d', [FTime div 3600, (FTime mod 3600) div 60,FTime mod 60]);
function ConvertSecondsToTime(iSeconds: Word): TDateTime;
var
Hour, Min, Sec: Word;
begin
Hour := iSeconds div 3600;
Min := (iSeconds div 60) mod 60;
Sec := iSeconds mod 60;
Result := EncodeTime(Hour, Min, Sec, 0);
end;
function SecToDateTime(Sec: LongWord):Double;
begin
Result:=(Sec/SecsPerDay);
end;