Printing date a file

Jeffrey Froman Jeffrey at Fro.man
Wed Aug 25 03:24:51 CEST 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