Convert MySQL datetime to timestamp
Try this please:
UPDATE table1 A, table2 B SET B.date_added = FROM_UNIXTIME(A.date_added) WHERE A.id=B.id
Reference.It seems like you have an issue with the way you format date stammp.Also please look into this post: Should I use field 'datetime' or 'timestamp'?
On MySQL 5.5 this works fine:
UPDATE `some_table`SET `timestamp_col` = `datetime_col`
with datetime_col
of type DATETIME
and timestamp_col
of type TIMESTAMP
.
That is: no needs of explicit type conversion.