MYSQL 时间函数总结

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

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

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

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

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

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



你可能感兴趣的:(MYSQL 时间函数总结)