I am having a problem with getting the correct dates from the cell using the 1.6.6 . I have two cells in the worksheet. One is 06/07/2009 and the other is a function with =Today().
The first problem is determining when to use PHPExcel_Shared_Date::ExcelToPHP and when not to. For instance when =Today you don;t; but for 06/07/2009 you do??
cell1 = =Today()
cell2 = 06/07/2009
Expected Results: Today = 2009-05-11
print "date1: " . date ( 'Y-m-d', $cell1->getCalculatedValue()); shows 2009-05-10
print "date2:" . date ( 'Y-m-d', PHPExcel_Shared_Date::ExcelToPHP( $cell2->getCalculatedValue()));
The results are that both dates are off by one.
Any ideas on what I am doing wrong?
What is the best logic to determine if need to use PHPExcel_Shared_Date::ExcelToPHP to calculate the date.