Unix Timestamp bigint(20)

2019-05-22 20:32发布

问题:

I am doing research in a MySQL database, and I suppose some timestamps are in Unix format.

Those timestamps are in a bigint(20) field.

I'm going crazy about them.

How can I convert these to a regular timestamp?

Example:

634583466272408810

634587264000000000

回答1:

try

select from_unixtime(634583466272408810/1000000000)

See FROM_UNIXTIME