DATEDIFF(expr,expr2) DATEDIFF() returns the number of days between the start date expr and the end date expr2. expr and expr2 are date or date-and-time expressions. Only the date parts of the values are used in the calculation. mysql> SELECT DATEDIFF('1997-12-31 23:59:59','1997-12-30');
        -> 1
mysql> SELECT DATEDIFF('1997-11-30 23:59:59','1997-12-31');
        -> -31
指的是函数datediff(expr1,expr2)返回的只能是天数,我查了一下好像没有直接就可以返回分钟的函数,如果是返回秒的话可以这样做:mysql> select unix_timestamp(now())-unix_timestamp('2006-6-14');
+---------------------------------------------------+
| unix_timestamp(now())-unix_timestamp('2006-6-14') |
+---------------------------------------------------+
|                                            230131 |
+---------------------------------------------------+
1 row in set (0.00 sec)