Sat, January 23, 2021
 
https://devcodepro.comdevcodepro
Home · Latest · Trends  /  SQL
6

MySQL update - Incorrect date value: 0000-00-00 00:00:00

MySQL error when update default value for DATETIME
UPDATE `users` SET `lastdate`='2017-01-01 00:00:00';

ALTER TABLE `users` CHANGE `lastdate` `lastdate` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP;
rated 6 times (6) (0)
comments: 0 / hits: 2381  / 4 years ago, sun, aug 6, 17, 05:31:35
More From » SQL
 

Comments

There are no comments for this Snippet yet
Only authorized users can post. Please sign in first, or register a free account
 
Share
Posted
bigjoe
Member since Aug 6, 2017
Total Code Snippets: 5
Total Comments: 0
Location: n/a
bigjoe snippets
4 years ago, sun, aug 6, 17, 5:14:06
comments: 0 / hits: 3140
SQL
4 years ago, tue, aug 22, 17, 7:46:43
comments: 0 / hits: 1678
4 years ago, tue, aug 22, 17, 6:12:46
comments: 1 / hits: 5464
CSS
3 years ago, wed, aug 30, 17, 5:56:41
comments: 0 / hits: 1372