I have been looking all over the web for this answer but dont understand all the things that were written. I try to do the from unix_timestamp() but it returns the wrong date. W
Try This
$date_format = floor($excelDateTime); $time_format = $excelDateTime - $date_format; $mysql_strdate = ($date_format > 0) ? ( $date_format - 25569 ) * 86400 + $time_format * 86400 : $time_format * 86400; $mysql_date_format = date("Y-d-m", $mysql_strdate);