Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

undjike's avatar

Weird MySQL error - Invalid datetime format

Hello all, I'm facing a weird problem today using Laravel, Livewire and MySQL.

SQLSTATE[22007]: Invalid datetime format: 1292 Incorrect datetime value: '1968-08-01 00:00:00' for column

The date provided (1968-08-01 00:00:00) is in a good format (Y-m-d H:i:s), I don't understand why MySQL is showing this error.

What's more confusing is that when I enter 1998-04-01 00:00:00 for instance, it's working.

Laravel 9.10.1 | PHP 8.0.2 | MySQL 8.0.28

Can someone help?

0 likes
4 replies
Sinnbeck's avatar

@undjike if I recall correctly you can use date instead of datetime, and that should work for dates before 1970

Please or to participate in this conversation.