标签:
语法为:TIMESTAMPDIFF(unit,datetime_expr1,datetime_expr2),
SELECT TIMESTAMPDIFF(SECOND, now(), ‘2014-01-27 15:52:11‘)
其中unit单位有如下几种,分别是:
FRAC_SECOND (microseconds),
SECOND,
MINUTE,
HOUR,
DAY,
WEEK,
MONTH,
QUARTER,
YEAR。
标签:
原文地址:http://my.oschina.net/u/582827/blog/373597