웹이야기

MySQL DAYNAME() 본문

D/MySQL

MySQL DAYNAME()

yeon.Biju 2020. 4. 1. 16:23

MySQL 날짜함수, 시간함수

 

DAYNAME()

   - weekday의 이름을 return.

 

DAYNAME(date)

의 형태

 

Returns the name of the weekday for date. The language used for the name is controlled by the value of the lc_time_names system variable.

 

mysql> SELECT DAYNAME('2020-03-01') ;
+-----------------------+
| DAYNAME('2020-03-01') |
+-----------------------+
| Sunday                |
+-----------------------+
1 row in set (0.00 sec)

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

mysql> SELECT DAYNAME('2020-03-00') ;
+-----------------------+
| DAYNAME('2020-03-00') |
+-----------------------+
| NULL                  |
+-----------------------+
1 row in set, 1 warning (0.00 sec)

 

 

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

MySQL DAYOFWEEK()  (0) 2020.04.01
MySQL DAYOFMONTH()  (0) 2020.04.01
MySQL DAY()  (0) 2020.04.01
MySQL DATE_SUB()  (0) 2020.04.01
MySQL DATE_FORMAT()  (0) 2020.04.01
Comments