Chinaunix
标题:
奇怪,mysql5.0.21下select unix_timestamp('2006-05-30') 返回值为零
[打印本页]
作者:
windsand
时间:
2006-05-30 18:08
标题:
奇怪,mysql5.0.21下select unix_timestamp('2006-05-30') 返回值为零
那位大大,告诉我怎么回事
默认安装
作者:
rardge
时间:
2006-05-30 22:13
我也是 5.0.21,工作正常。
只有输入的日期超过它能处理的范围时,才返回 0。
会不会和你时区设置有关?
作者:
okchina
时间:
2006-05-31 09:22
我得到"1148918400"
是什么意思啊?
作者:
rardge
时间:
2006-05-31 11:31
原帖由
okchina
于 2006-5-31 09:22 发表
我得到"1148918400"
是什么意思啊?
秒数,从 '1970-01-01 00:00:00' 到 unix_timestamp() 函数括号中时间的秒数。
‘时间戳’这个术语听说过吧。
用 from_unixtime() 函数可以把这个再回复到你能读懂的日期表示。
欢迎光临 Chinaunix (http://bbs.chinaunix.net/)
Powered by Discuz! X3.2