有?
麻烦写一下,我查不到

解决方案 »

  1.   

    哦,是只能统计天数
    不能任意统计秒,分钟,小时等
      

  2.   

    还有一个函数:
    TIMEDIFF(expr,expr2) TIMEDIFF() returns the time between the start time expr and the end time expr2. expr and expr2 are time or date-and-time expressions, but both must be of the same type. mysql> SELECT TIMEDIFF('2000:01:01 00:00:00',
        ->                 '2000:01:01 00:00:00.000001');
            -> '-00:00:00.000001'
    mysql> SELECT TIMEDIFF('1997-12-31 23:59:59.000001',
        ->                 '1997-12-30 01:01:01.000002');
            -> '46:58:57.999999'