MySQL Store a Javascript timestamp into a TIMESTAMP column


If you have a Javascript timestamp value, for example 1478960868932, you can convert that to a MySQL fractional time value like this:

FROM_UNIXTIME(1478960868932 * 0.001)

It's simple to use that kind of expression to store your Javascript timestamp into a MySQL table. Do this:

INSERT INTO table (col) VALUES (FROM_UNIXTIME(1478960868932 * 0.001))

(Obviously, you'll want to insert other columns.)