How can set format datetime [PHPExcel]
<p>set format datetime with php
and output excel</p>

<pre><code>date_default_timezone_set('Asia/Bangkok');
$objPHPExcel-&gt;getActiveSheet()-&gt;SetCellValue('S1', 'Show DateTime');
$dateValue = PHPExcel_Shared_Date::PHPToExcel( strtotime('23-Apr-1989 17:05:50') );
$objPHPExcel-&gt;getActiveSheet()
    -&gt;setCellValue('S2', $dateValue);
$objPHPExcel-&gt;getActiveSheet()
    -&gt;getStyle('S2')
    -&gt;getNumberFormat()
    -&gt;setFormatCode(PHPExcel_Style_NumberFormat::FORMAT_DATE_YYYYMMDDSLASH);
</code></pre>

<p><br>but output <br><br>
<a href="https://i.stack.imgur.com/Iy83N.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Iy83N.jpg" alt="enter image description here"></a></p>

<p><br><br> How can show data on Excel <strong>23/04/1989 17:05:50</strong> and excel type <strong>Date</strong></p>