Tuesday, August 3, 2010

Python - get date and time

To get current date and time:

from time import strftime

strftime("%Y/%m/%d %H:%M:%S")

'2010/07/28 21:50:30'

No comments:

Post a Comment