here are 4 ways
int t = 3665 ;; seconds
;;#1 using string format
_s.format("%02i:%02i:%02i" t/3600 t/60%60 t%60);
out _s
;;#2 using F Format
out F"{t/3600%%02i}:{t/60%60%%02i}:{t%60%%02i}"
;;#3 using TimeSpanToStr(TimeSpanFromParts())
out TimeSpanToStr(TimeSpanFromParts(0 0 0 t))
;;#4 using TimeSpanToStr
out TimeSpanToStr(t*10000000L)