I am getting date format from database in YYYY-MM-DD format and I am using given code to convert this format.
$tempdate='2017-11-09';
$convertdate= date("d-m-y" , strtotime($tempdate));
but converted date is in 09-11-17, how can I convert this date into '09-11-2017'.