Do you mean epoch time?  if so, the below example would work.

import time,datetime
t = datetime.datetime.now()
print t
2007-02-20 13:09:34.851000
print "Epoch Seconds:", time.mktime(t.timetuple())
Epoch Seconds: 1171994974.0

# go the other way
epochtime = 1171994974
now = datetime.datetime.fromtimestamp(epochtime)
print now
2007-02-20 13:09:34

On 2/20/07, Vishal Bhargava <[EMAIL PROTECTED]> wrote:


Is there an inbuilt library in Python which you can use to convert time in
seconds to hh:mm:ss format?
Thanks,
Vishal

--
http://mail.python.org/mailman/listinfo/python-list

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to