Printing date a file

K

Kory Wheatley

In Python how would you print the date in a file, I
have a logging program written in python and for each
new recorded added to the file, I would like to print
the
date, something like this below:

08/24/2004 or 08-24-2004

--
Kory Wheatley



__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail
 
W

wes weston

Kory said:
In Python how would you print the date in a file, I
have a logging program written in python and for each
new recorded added to the file, I would like to print
the
date, something like this below:

08/24/2004 or 08-24-2004

--
Kory Wheatley



__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail

Kory,
Works. Maybe a better way.
wes
24
 
B

Bernd Kaiser

I would use the "International Date Format (ISO 8601)"

CCYY-MM-DD (2004-08-24)

Regards,
Bernd Kaiser
 
B

Beeyah

Kory Wheatley said:
In Python how would you print the date in a file, I
have a logging program written in python and for each
new recorded added to the file, I would like to print
the
date, something like this below:

08/24/2004 or 08-24-2004

Read up on the time module, specifically strftime.

Daniel Bickett
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,781
Messages
2,569,615
Members
45,294
Latest member
LandonPigo

Latest Threads

Top