The month format specifier doesn\'t seem to work.
from datetime import datetime endDate = datetime.strptime(\'10 3 2011\', \'%j %m %Y\') print endDate 2011-0
%j specifies a day of the year. It's impossible for the 10th day of the year, January 10, to occur in March, so your month specification is being ignored. Garbage In, Garbage Out.
%j