Pages

Saturday, July 3, 2010

How to find today's date and time in Python????

To find today's date  and time...
we have a module called "datetime" in Python.....


See the following code.....

import datetime
d=datetime.datetime.now()
print str(d)

In my System, I got the output as,

2010-07-04 02:08:45.862000

No comments:

Post a Comment