Understanding Mode (Optional Parameter , value 0 to 7)
The week can start on Sunday or Monday,
To understand uses of MODE, read WEEK() function
If mode is not given, then it is considered as 0. The default_week_format of the MySQL system variables is not considered in YEARWEEK() function like WEEK() function. This is the main difference while using MODE between WEEK() function and YEARWEEK() function.
Passionate about coding and teaching, I publish practical tutorials on PHP, Python,
JavaScript, SQL, and web development. My goal is to make learning simple, engaging, and
project‑oriented with real examples and source code.