MySQL的FROM_UNIXTIME()和UNIX_TIMESTAMP()函数

FROM_UNIXTIME(unix_timestamp)是MySQL里的时间函数。

UNIX_TIMESTAMP() 是与之相对正好相反的时间函数 。

e.g.

select unix_timestamp('2017-01-01')

返回值:1483200000

select  from_unixtime(1483200000)

返回值:2017-01-01 00:00:00
 

发布了105 篇原创文章 · 获赞 58 · 访问量 11万+

猜你喜欢

转载自blog.csdn.net/yzf279533105/article/details/104444939
今日推荐