I need to convert date format in php , But i am getting getting error
here is my code
$test = new DateTime('23/09/2016');
echo date_format($test, 'Y-m-d');
But i am getting error as
Message: DateTime::__construct(): Failed to parse time string (23/09/2016) at position 0 (2): Unexpected character
How to resolve the issue