MYSQL 时间函数总结

from_unixtime('1436926771','%Y-%m-%d %H:%i:%s')   结果:   2015-07-15 10:19:31web

date_format('2008-08-08 22:23:01', '%Y%m%d%H%i%s')spa

str_to_date('08/09/2008', '%m/%d/%Y'); -- 2008-08-09unix

unix_timestamp('2008-08-08 12:30:00'); -- 1218169800orm

from_unixtime(1218169800); -- '2008-08-08 12:30:00'it

date_add('2008-08-08 12:00:00', interval -8 hour); -- 2008-08-08 04:00:00form

相关文章
相关标签/搜索