웹이야기

MySQL MONTHNAME() 본문

D/MySQL

MySQL MONTHNAME()

yeon.Biju 2020. 4. 2. 13:50

MySQL 날짜함수, 시간함수

 

MONTHNAME()

   - 달의 이름을 구해준다.

 

MONTHNAME(date)

의 형태

 

Returns the full name of the month for date. The language used for the name is controlled by the value of the lc_time_names system variables.

 

 

mysql> SELECT MONTHNAME(NOW());
+------------------+
| MONTHNAME(NOW()) |
+------------------+
| April            |
+------------------+
1 row in set (0.00 sec)

 

mysql> SELECT MONTHNAME('202-00-00');
+------------------------+
| MONTHNAME('202-00-00') |
+------------------------+
| NULL                   |
+------------------------+
1 row in set (0.00 sec)

 

 


mysql> SELECT MONTHNAME('202-01-00');
+------------------------+
| MONTHNAME('202-01-00') |
+------------------------+
| January                |
+------------------------+
1 row in set (0.00 sec)

 

'D > MySQL' 카테고리의 다른 글

MySQL PERIOD_ADD()  (0) 2020.04.02
MySQL NOW()  (0) 2020.04.02
MySQL MONTH()  (0) 2020.04.02
MySQL MINUTE()  (0) 2020.04.02
MySQL MICROSECOND()  (0) 2020.04.02
Comments