Current date and time
Mike Fletcher
mfletch at tpresence.com
Tue Jun 20 21:56:45 EDT 2000
http://www.python.org/doc/current/lib/module-time.html
>>> time.strftime( '%A %d %B %Y %H:%Mhr', time.gmtime( time.time()))
'Wednesday 21 June 2000 01:55hr'
or, for the local time (as opposed to the UTC time)...
>>> time.strftime( '%A %d %B %Y %H:%Mhr', time.localtime( time.time()))
'Tuesday 20 June 2000 21:56hr'
Documentation is your friend :) ,
Mike
-----Original Message-----
From: Aeneas [mailto:shan_mu <nospam]
Sent: Tuesday, June 20, 2000 9:19 PM
To: python-list at python.org
Subject: Re: Current date and time
How do you format the result as--
"Tuesday 20 June 2000 21:18hr" ?
Thanks.
...
More information about the Python-list
mailing list