WEEKOFYEAR

2025-11-19 10:08:12  Updated

Syntax

WEEKOFYEAR(date)

Purpose

WEEKOFYEAR() returns the ordinal number of the week in the year of date.

Examples

obclient> SELECT WEEKOFYEAR('2020-07-16');
+--------------------------+
| WEEKOFYEAR('2020-07-16') |
+--------------------------+
|                       29 |
+--------------------------+
1 row in set

Contact Us