I want to convert the date October012000 format to 01/10/2000 in python.I'm sharing my code here.Please correct my mistake......
Code:
date=October012000
day=date2[-6:-4]
year=date2[-4:]
month=date2[0:-6]
print year,day,month
monthDict = {'January':1, 'February':2, 'March':3, 'April':4, 'May':5, 'June':6,
'July':7, 'August':8, 'September':9, 'October':10, 'November':11, 'December':12}
month = monthDict[month]
Date=day+"/"+month+"/"+year
But i'm getting the following error:
Output:
TypeError Traceback (most recent call last)
<ipython-input-23-42dbf62e7bab> in <module>()
3 #month1=str(month)
4 #day
----> 5 Date=day+"/"+month+"/"+year
TypeError: cannot concatenate 'str' and 'int' objects