andyandy
1 month ago

mysql DATETIME doesn't accept high dates (10+ years from now)

Posted 1 month ago by andyandy

This works:

$record->end_date = '2025-10-16 11:05:00';

But this not:

$record->end_date = '2060-10-16 11:05:00';

I will get:

SQLSTATE[22007]: Invalid datetime format: 1292 Incorrect datetime value: '2060-10-16 11:05:00' for column `records`.`end_date` at row 1 (SQL: insert into `records` (`end_date`) values ( 2060-10-16 11:05:00)

Please sign in or create an account to participate in this conversation.