ID EN
Date and Time Functions

YEARWEEK(date)

MySQL 8.4 🇮🇩 Bahasa Indonesia

MINGGU TAHUN(tanggal), MINGGU TAHUN(tanggal,mode)

Syntax

MYSQL
SELECT YEARWEEK('1987-01-01');
198652

Contoh

Example

Returns year and week for a date. The year in the result may be different from the year in the date argument for the first and the last week of the year. Returns NULL if date is NULL.

MYSQL
SELECT YEARWEEK('1987-01-01');
198652