mysql 时间戳最大值
2019-06-28 本文已影响0人
良人与我
mysql 时间戳最大值只能到 2038-01-19 03:14:07
The DATE type is used for values with a date part but no time part. MySQL retrieves and displays DATE values in 'YYYY-MM-DD' format. The supported range is '1000-01-01' to '9999-12-31'.
The DATETIME type is used for values that contain both date and time parts. MySQL retrieves and displays DATETIME values in 'YYYY-MM-DD hh:mm:ss' format. The supported range is '1000-01-01 00:00:00' to '9999-12-31 23:59:59'.
The TIMESTAMP data type is used for values that contain both date and time parts. TIMESTAMP has a range of '1970-01-01 00:00:01' UTC to '2038-01-19 03:14:07' UTC.
自己亲自试了试,存入2040年的时间,果真报错了
![](https://img.haomeiwen.com/i8451293/64d9bbfb2db9cce8.png)