MySQL Tutorial/Date Time Functions/CURTIME — различия между версиями
Admin (обсуждение | вклад) м (1 версия) |
|
(нет различий)
|
Версия 13:44, 26 мая 2010
CURTIME() returns the current time as a value in "HH:MM:SS" or HHMMSS format, depending on whether the function is used in a string or numeric context
CURRENT_TIME and CURRENT_TIME() are synonyms for CURTIME().
mysql>d
mysql> SELECT CURTIME();
+-----------+
| CURTIME() |
+-----------+
| 19:46:02 |
+-----------+
1 row in set (0.00 sec)
mysql>
mysql> SELECT CURTIME() + 0;
+---------------+
| CURTIME() + 0 |
+---------------+
| 194602.000000 |
+---------------+
1 row in set (0.00 sec)
mysql>
mysql>
mysql> select CURRENT_TIME();
+----------------+
| CURRENT_TIME() |
+----------------+
| 19:46:02 |
+----------------+
1 row in set (0.00 sec)
mysql>
mysql>
mysql>
mysql>
Using CURTIME() function
mysql>
mysql> select CURTIME();
+-----------+
| CURTIME() |
+-----------+
| 13:54:27 |
+-----------+
1 row in set (0.00 sec)