I'm retrieving data from the mysql database and using it to generate an excel file. I keep on getting a corrupted xlsx file which is being affected by the date syntax.
How do you pick a date (type) value from the database and feed it in a cell using PHPExcel? e.g 

```
$objPHPExcel -> getActiveSheet() -> SetCellValue('A' . $i, $result["name"]); 
$objPHPExcel -> getActiveSheet() -> SetCellValue('B' . $i, $result["dateofcontract"]);

```