How to convert integer in time string (hh:mm:ss)

I have an application that uses a chrnometer and compute seconds.
How to convert the seconds (integer) in hh:mm:ss format for display (and sharing) in a string?

More generaly speaking do we have a “C” like sprintf() function with % format ?

1 Like

You can learn from this link @fbd38

Salman Dev

1 Like


I tried it but there is a problem with the TimeZone that creates an offset that we have to substract. This is a real convern if your application is supposed to run in different contries with different time zone.

I am looking for something simplest. Just convert any number (whatever the type) in hh:mm:ss string.


1 Like

mey be you need extension you can check an extension here @fbd38

1 Like

Try this extension:



1 Like

Thanks a lot !

AI2 has time format items to give you those.
See SimpleDateFormat (Java Platform SE 7 )