How to convert a specific integer to datetime in python

datetime, python, python-datetime, strptime

Solution

import datetime
d = datetime.datetime.strptime(input, '%m%d%y')

Problem

For example, I have the int 043017, which I want converted to 04/30/17 (April 30, 2017), I want to be able to convert any int of that format into datetime, how can this be accomplished?

Original source