Printing date a file

Jeffrey Froman Jeffrey at Fro.man
Tue Aug 24 21:24:51 EDT 2004


Kory Wheatley wrote:

> In Python how would you print the date in a file...

Here's my favorite way:

>>> import datetime
>>> datetime.date.today().isoformat()
'2004-08-24'

Jeffrey



More information about the Python-list mailing list