웹이야기

MySQL CURTIME() 본문

카테고리 없음

MySQL CURTIME()

yeon.Biju 2020. 4. 1. 14:53

MySQL 날짜함수, 시간함수

 

CURTIME()

   - 현재시간을 return 해주는 함수

   - 문자열 형태, 또는 numeric 형태로 return.

 

CURTIME([fsp])

의 형태

 

Returns the current time as a value in 'hh:mm:ss' or hhmmss format, depending on whether the functions is used in string or numeric context. The value is expressed in the session time zone.

 

In the fsp argument is given to speicify a fractional seconds precision from 0 to 6, the return value includes a fractional seconds part of that many digits.

 

mysql> SELECT CURTIME();
+-----------+
| CURTIME() |
+-----------+
| 14:52:14  |
+-----------+
1 row in set (0.01 sec)

 

mysql> SELECT CURTIME()+0;
+-------------+
| CURTIME()+0 |
+-------------+
|      145226 |
+-------------+
1 row in set (0.00 sec)

 

 

 

Comments