SQLSTATE[22007]: Invalid datetime format: 1292 Incorrect datetime value

Updated at 22-Aug-2022, By samar

SQLSTATE[22007]: Invalid datetime format: 1292 Incorrect datetime value

Through the use of the programming language, we will work together to solve the "SQLSTATE[22007]: Invalid datetime format: 1292 Incorrect datetime value" puzzle in this lesson.

While migrating the migration file using php artisan migrate getting error SQLSTATE[22007]: Invalid datetime format: 1292 Incorrect datetime value. Column type for dateTime in the migration file is.

$table->dateTime('posted_at');

  • $table->dateTime('posted_at')->nullable();
    

Back to code snippet queries related laravel