PHP date_format() expects parameter 1 to be DateTimeInterface
<p>I want to convert string to date time, but it's not work..  </p>

<pre><code>&lt;?php  
$date = date_create_from_format('d_m_Y_H_i_s', '29_11_2016_5_0_15');
echo date_format($date, 'Y-m-d');
</code></pre>

<p>return  </p>

<pre><code>Warning: date_format() expects parameter 1 to be DateTimeInterface, boolean given ...
</code></pre>

<p>what is the solution ??</p>