Writing elapsed time as a string

Simon Pickles sipickles at googlemail.com
Fri May 2 15:13:41 EDT 2008


Hello.

I'm sorry if this has been asked a thousand (million) times.

Is there a nifty pythonesque way to produce a string representing an 
elapsed time period, in terms of years, months, days, hours, mins, seconds?

I am storing times in a MySQL db, and would love to be able to write the 
time elapsed between accesses of certain data. These are in seconds 
since the epoch, as produced by time.time()

It is probable right in front of me in the docs but I am spinning off 
into outer space (mentally!)

Thanks for the temporary loan of your clarity and experience.

Simon
-- 

http://www.squirtual-reality.com
--------------------------------
Linux user #458601 - http://counter.li.org.



More information about the Python-list mailing list