MySQL DATETIME类型和Timestamp之间的转换
<br />DATETIME -> Timestamp: UNIX_TIMESTAMP(...)<br />Timestamp -> DATETIME: FROM_UNIXTIME(...)<br /> <br />mysql> SELECT FROM_UNIXTIME(UNIX_TIMESTAMP(NOW()));<br />+--------------------------------------+<br />| FROM_UNIXTIME(UNIX_TIMESTAMP(NOW())) |<
原创
2010-09-06 14:30:00 ·
42355 阅读 ·
0 评论