skip to Main Content

Laravel Importing CSV throws error on rows with dates

Import.php ... return new Statement([ 'account_number' => $row['accountno'], 'account_name' => $row['name'], 'reading_date' => CarbonCarbon::createFromFormat('m/d/Y', $row['billdate']), 'due_date' => CarbonCarbon::createFromFormat('m/d/Y', $row['duedate']), ]); ... Error: IlluminateDatabaseQueryException PHP 8.1.6 9.37.0 SQLSTATE[22007]: Invalid datetime format: 1292 Incorrect date value: '10/18/2022' for column `mubsdb`.`statements`.`due_date` at row…

VIEW QUESTION
Back To Top
Search