Skip to content

Instantly share code, notes, and snippets.

@wajatimur
Created August 2, 2011 15:41
Show Gist options
  • Save wajatimur/1120469 to your computer and use it in GitHub Desktop.
Save wajatimur/1120469 to your computer and use it in GitHub Desktop.
Convert Second To TIme.
function SecToTime(Sec: Integer): string;
var
H, M, S: string;
ZH, ZM, ZS: Integer;
begin
ZH := Sec div 3600;
ZM := Sec div 60 - ZH * 60;
ZS := Sec - (ZH * 3600 + ZM * 60) ;
H := IntToStr(ZH) ;
M := IntToStr(ZM) ;
S := IntToStr(ZS) ;
Result := H + ':' + M + ':' + S;
end;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment