human
Convert date format python
assistant
Here is some code to represent DateTime object '10/05/2012' with format '%d/%m/%Y' into format '%Y-%m-%d'

datetime.datetime.strptime('10/05/2012', '%d/%m/%Y').strftime('%Y-%m-%d')

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