Laravel excel import, date column in excel cell returns as floating value. How to solve this?

后端 未结 4 1925
陌清茗
陌清茗 2021-01-20 17:09

By using Maatwebsite/Laravel-Excel to import excel sheet, here I faced an issue date time column of the excel sheet returns float value. How to solve this? Example : Conside

4条回答
  •  悲&欢浪女
    2021-01-20 18:08

    This only happend when use chunk. This issue could be solved by:

    $UNIX_DATE = ($row->DOB - 25569) * 86400;
    $date_column = gmdate("d-m-Y H:i:s", $UNIX_DATE);
    

提交回复
热议问题