Reputation: 5509
This is the short version of my table schema.
CREATE TABLE `users` (
`id` bigint(20) UNSIGNED NOT NULL,
`birthday` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
I can't insert time values before 1970-01-01 00:00:00.
I get this error:
ER_TRUNCATED_WRONG_VALUE: Incorrect datetime value: '1964-02-19 16:57:55' for column 'birthday.
How can I fix that?
Upvotes: 0
Views: 4453
Reputation: 5509
According to Mysql Documentation, TIMESTAMP has a range of '1970-01-01 00:00:01' UTC to '2038-01-19 03:14:07' UTC.
To solve the problem, I changed the column from TIMESTAMP to DATETIME.
Upvotes: 4