title: How do i format cell value as date in PHPExcel?
body: <p>I want to output the data in my excel file in the web. One of the cells in the excel is formatted as date and returns like this when outputted:</p>
  
  <pre><code>A000001 |   John Doe      | DR | 41456 | 41465&lt;--  // this should be date
  A000002 |   Philip Moris  | CP | 41456 | 41465     // formatted as yyyy-mm-dd
  
  
  
  require_once("controller/xls/Classes/PHPExcel/IOFactory.php");
  $objPHPExcel = PHPExcel_IOFactory::load($filer);
  foreach ($objPHPExcel-&gt;getWorksheetIterator() as $worksheet) 
  {
      $worksheetTitle     = $worksheet-&gt;getTitle();
  $highestRow         = $worksheet-&gt;getHighestRow(); // e.g. 10
  $highestColumn      = $worksheet-&gt;getHighestColumn(); // e.g 'F'
  $highestColumnIndex = PHPExcel_Cell::columnIndexFromString($highestColumn);
  $nrColumns = ord($highestColumn) - 64;
  
  echo '&lt;table&gt;';
  for ($row = 5; $row &lt;= $highestRow; ++ $row) 
  {
  echo '&lt;tr&gt;';
       for ($col = 1; $col &lt; $highestColumnIndex; ++ $col)
       {
      $cell = $worksheet-&gt;getCellByColumnAndRow($col, $row);
      $val = $cell-&gt;getValue();
      echo '&lt;td&gt;'.$val.'&lt;/td&gt;';
       }
  echo '&lt;/tr&gt;';
  }
  echo '&lt;/table&gt;';
  }
  </code></pre>
  
  <p>Is it unix time? If so, how do i format it when I'm using getCellByColumnAndRow? I will also  store this in mysql db. Tnx.</p>