MySQL Tutorial/Date Time Functions/SUBTIME — различия между версиями
Admin (обсуждение | вклад) м (1 версия) |
|
(нет различий)
|
Текущая версия на 09:50, 26 мая 2010
SELECT SUBTIME("01:00:00.999999", "02:00:00.999998");
mysql>
mysql>
mysql> SELECT SUBTIME("01:00:00.999999", "02:00:00.999998");
+-----------------------------------------------+
| SUBTIME("01:00:00.999999", "02:00:00.999998") |
+-----------------------------------------------+
| -00:59:59.999999 |
+-----------------------------------------------+
1 row in set (0.00 sec)
SUBTIME(expr1,expr2)
mysql>
mysql> SELECT SUBTIME("1997-12-31 23:59:59.999999","1 1:1:1.000002");
+--------------------------------------------------------+
| SUBTIME("1997-12-31 23:59:59.999999","1 1:1:1.000002") |
+--------------------------------------------------------+
| 1997-12-30 22:58:58.999997 |
+--------------------------------------------------------+
1 row in set (0.00 sec)