I want to parse dates like these into a datetime object:
The following will work for the first d
Try using the dateutil.parser module.
import dateutil.parser date1 = dateutil.parser.parse("December 12th, 2008") date2 = dateutil.parser.parse("January 1st, 2009")
Additional documentation can be found here: http://labix.org/python-dateutil