我有以下表结构:
uid | ... | created | ...
int(10) | ... | int(10) | ...
created
字段填充时间戳;这是查询的结果SELECT created FROM mytable WHERE 1 LIMIT 5
:
created
----------
1308122243
1308122243
1308552690
1309247417
1309254571
但是当我执行时SELECT DATE(created) FROM mytable WHERE 1 LIMIT 5
,我得到了奇怪的 NULL:
DATE(created)
-------------
2013-08-12
2013-08-12
NULL
NULL
NULL
为什么会这样?