Answer the question
In order to leave comments, you need to log in
How to transfer date from excel to mysql?
I use the PHPExcel library to import from XLS, the problem is that when importing the date data type in Excel (10/20/2020), it translates to an incomprehensible year, if the data type is set to varchar, it translates to 44114, when using date(), shows 01/01/1970
Answer the question
In order to leave comments, you need to log in
The library is no longer maintained, instead PhpSpreadsheet from the same developers.
I myself patched this PHPExcel a hundred times at home, then the cell styles are not applied, what else.
44114 is clearly only 12 hours from the beginning of Unix Time, don't use date here, it's not a timestamp, it's an Excel format.
Use something like
->getCell('I5')->getFormattedValue()
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question