MySQL Tutorial/Date Time Functions/TIMEDIFF — различия между версиями
Admin (обсуждение | вклад) м (1 версия) |
|
(нет различий)
|
Текущая версия на 09:50, 26 мая 2010
SELECT TIMEDIFF("1997-59:59.000001", "1997-01:01.000002");
mysql>
mysql> SELECT TIMEDIFF("1997-12-31 23:59:59.000001", "1997-12-30 01:01:01.000002");
+----------------------------------------------------------------------+
| TIMEDIFF("1997-12-31 23:59:59.000001", "1997-12-30 01:01:01.000002") |
+----------------------------------------------------------------------+
| 46:58:57.999999 |
+----------------------------------------------------------------------+
1 row in set (0.02 sec)
mysql>
TIMEDIFF(expr1,expr2) returns expr1 ��C expr2 expressed as a time value.
mysql>
mysql> SELECT TIMEDIFF("2000:01:01 00:00:00", "2000:01:01 00:00:00.000001");
+---------------------------------------------------------------+
| TIMEDIFF("2000:01:01 00:00:00", "2000:01:01 00:00:00.000001") |
+---------------------------------------------------------------+
| -00:00:00.000001 |
+---------------------------------------------------------------+
1 row in set (0.01 sec)