I am trying to convert a string to a date. If I read the doc correctly , the following code should work:
import datetime
d = datetime.strptime('January 01, 2015', '%B %d, %Y')
Instead, I get the error:
AttributeError: 'module' object has no attribute 'strptime'
source
to share