function to convert any date to mm/dd/yyyy format python code example
Example: python date from yy/mm/dd to yy-mm-dd
lastconnection = datetime.strptime("21/12/2008", "%d/%m/%Y").strftime('%Y-%m-%d')
lastconnection = datetime.strptime("21/12/2008", "%d/%m/%Y").strftime('%Y-%m-%d')