开发者

Saving a UNIX timestamp in MySQL as type DOUBLE?

开发者 https://www.devze.com 2023-01-25 03:42 出处:网络
My function call takes some input, and throws it into a database. Usually, it\'s integers, but today, I need it to throw in a unix timestamp.

My function call takes some input, and throws it into a database. Usually, it's integers, but today, I need it to throw in a unix timestamp.

This overflew the FLOAT type, bu开发者_StackOverflow社区t works with type DOUBLE.

Is there anything I should be worried about by saving that 10-digit integer in type DOUBLE?


The total precision of a DOUBLE PRECISION value is approximately 16 decimal digits, so you should not worry, even if you store milliseconds or microseconds.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号