웹이야기

MySQL WEEKOFYEAR() 본문

D/MySQL

MySQL WEEKOFYEAR()

yeon.Biju 2020. 4. 5. 13:33

MySQL 날짜함수, 시간함수

 

WEEKOFYEAR()

   -

 

WEEKOFYEAR(date)

의 형태

 

Returns the calendar week of the date as a number in the range from 1 to 53. WEEKOFYEAR() is a compatibility function that is equivalent to WEEK(date, 3).

 

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

mysql> SELECT WEEKOFYEAR('2020-04-05');
+--------------------------+
| WEEKOFYEAR('2020-04-05') |
+--------------------------+
|                       14 |
+--------------------------+
1 row in set (0.00 sec)

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

MySQL YEARWEEK()  (0) 2020.04.05
MySQL YEAR()  (0) 2020.04.05
MySQL WEEKDAY()  (0) 2020.04.05
MySQL WEEK()  (0) 2020.04.05
MySQL UTC_TIMESTAMP()  (0) 2020.04.05
Comments