Date/Time Conversion
Paul Osman
paul.osman at sympatico.ca
Thu Nov 7 14:08:31 EST 2002
On Thu, 7 Nov 2002, dapmco wrote:
> Im new to Python.. I have it installed on a win2k server. Im trying to
> figure out how to return the date if I enter a number corresponding
> to # of seconds since the Epoch
>
> Anyone know of a good site with example code??
>
> Dave
You'll want to look at the Python Library Reference for the
time module:
http://www.python.org/doc/current/lib/module-time.html
Example code:
import time
time_stamp = 1036695674
print time.strftime("%B %d %Y", time.localtime(time_stamp))
Cheers,
--
Paul Osman
posman at linux.ca
http://paul.codecipher.com
More information about the Python-list
mailing list