Mostly Linux & Python syntax notes and hyperlinks.

Friday, January 15, 2010

python: time.strptime() instead of datetime.strptime()

Either one worked correctly from the python prompt, but when I embedded it in another tool,
fdate=time.strptime("SEPTEMBER 19 2010", "%B %d %Y")
worked, and
fdate=datetime.strptime("SEPTEMBER 19 2010", "%B %d %Y")
triggered an exception.

No comments:

Post a Comment