Not all arguments converted error in python string format

I heard you like formatting, but you don’t need to put formatting in your formatting. Leave out the %s part and use the month/day/year format that you say Excel is giving you:

>>> import datetime
>>> d2 = datetime.datetime.strptime("7/23/2013", '%m/%d/%Y')
>>> d2
datetime.datetime(2013, 7, 23, 0, 0)

Leave a Comment