开发者

Saving a UNIX timestamp in MySQL as type DOUBLE?

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜