18991230 in cell empty

Topics: Developer Forum
Jun 26, 2013 at 12:29 AM
If i write a date i a cell and after i delete it, i not see nothing in the cell but if i import it with phpexcel i obtain a 18991230 value.
Do it is possible to avoid?
Jun 26, 2013 at 10:17 AM
There's a whole section of documentation on dates in the "PHPExcel Function Reference developer documentation" file that explains about Excel timestamp values, and how to convert between Excel timestamp values and Unix timestamps or PHP DateTime objects, and plenty of Examples showing how to work with dates. An Excel "date" is simply a number that can be number format masked to look like a human-readable date, in the same way that a PHP date is simply a unix timestamp, that you can pass to the date() function together with a format mask.

Your helper functions are:
  • PHPExcel_Shared_Date::ExcelToPHP()
  • PHPExcel_Shared_Date::ExcelToPHPObject()
  • PHPExcel_Shared_Date::PHPToExcel()
  • PHPExcel_Shared_Date::FormattedPHPToExcel()