May be >>> sec = 2472 >>> "%d:%02d:%02d" % (int(sec/360), int(sec % 360 /60), int(sec % 60)) '6:05:12'
Regards -----Mensaje original----- De: Ognjen Bezanov [mailto:[EMAIL PROTECTED] Enviado el: Jueves, 02 de Junio de 2005 03:29 p.m. Para: python-list@python.org Asunto: Formatting Time I never thought id need help with such a thing as time formatting (admittadly i never did it before) but ok, i guess there is a first for everything. I have a float variable representing seconds, and i want to format it like this: 0:00:00 (h:mm:ss) Now search as I might i am finding this quite elusive, i had a look at the time module but that seems overly complicated for this. Anyone got any simple solutions to doing this? cheers! -- http://mail.python.org/mailman/listinfo/python-list