I need to import an excel file into database using PHPExcel the issue is with the date,The date can be in any format in excel file.
when the date in excel file is in this format 12/12/2012 (m/d/y) it save correctly into database but if the format date in excel file is this 24/11/2014(d/m/y) it upload blank when 24/12/2012(d/m/y) the value is 2036-03-01
$data = $objWorksheet->getCellByColumnAndRow($col, $row);
if(PHPExcel_Shared_Date::isDateTime($data)){
$cellValue = $objWorksheet->getCellByColumnAndRow($col, $row)->getValue();
$dateValue = PHPExcel_Shared_Date::ExcelToPHP($cellValue);
$dob = date('Y-m-d',$dateValue);
} else{
$datedata = "NULL";
}
hope you can help me guyz