Use WEEKDAY() instead of DAYOFWEEK(), it begins on Monday.
WEEKDAY()
DAYOFWEEK()
If you need to start at index 1, use or WEEKDAY() + 1.
WEEKDAY() + 1
Example:
Source: https://stackoverflow.com/questions/1202919/mysql-dayofweek-my-week-begins-with-monday
No comments :
Post a Comment