日期:2014-05-16 浏览次数:20891 次
mysql> select SUBSTRING_INDEX(timediff(@d1,@d2),':',1); +------------------------------------------+ | SUBSTRING_INDEX(timediff(@d1,@d2),':',1) | +------------------------------------------+ | -26 | +------------------------------------------+ 1 row in set (0.00 sec) mysql> select SUBSTRING_INDEX(timediff(@d2,@d1),':',1); +------------------------------------------+ | SUBSTRING_INDEX(timediff(@d2,@d1),':',1) | +------------------------------------------+ | 26 | +------------------------------------------+ 1 row in set (0.00 sec) mysql>