页次: 1
mysql 中的 datetime
可以参考 date
time
标准格式是 YYYY-MM-DD HH:MM:SS 或者 YYYYMMDDHHMMSS
示例
mysql> create table tb_datetime( dt datetime); Query OK, 0 rows affected (0.27 sec) mysql> insert into tb_datetime values ("2000-1-2 3:4:6"), ("2000010203030406"); Query OK, 2 rows affected (0.05 sec) Records: 2 Duplicates: 0 Warnings: 0 mysql> select * from tb_datetime; +---------------------+ | dt | +---------------------+ | 2000-01-02 03:04:06 | | 2000-01-02 03:03:04 | +---------------------+ 2 rows in set (0.00 sec)
ipbbs.net
离线
页次: 1