human
Python date string to date object
assistant
Here is some code to convert date string '24052010' to date object in format '%d%m%Y'

datetime.datetime.strptime('24052010', '%d%m%Y').date()

#Warning: this code generation is experimental. Please inspect the code for any bugs before executing.