SELECT
ADDDATE(CURDATE(), INTERVAL (1 - DAYOFWEEK(CURDATE())) DAY) WeekStart,
ADDDATE(CURDATE(), INTERVAL (7 - DAYOFWEEK(CURDATE())) DAY) WeekEnd
Reference:
http://stackoverflow.com/questions/3317980/getting-first-day-of-the-week-in-mysql-using-week-no
No comments:
Post a Comment