Formatting Time

John Machin sjmachin at lexicon.net
Thu Jun 2 19:07:47 EDT 2005


rochoa at cimex.com.cu top-posted:
> May be
> 
> 
>>>>sec = 2472
>>>>"%d:%02d:%02d" % (int(sec/360), int(sec % 360 /60), int(sec % 60))
> 
> '6:05:12'
> 

Could you possibly have meant 3600 instead of 360?



More information about the Python-list mailing list