Details
Description
select yearweek('2014-02-25') - returns 201408 instead of 201409
select week('2014-02-25') - returns 8 instead of 9
It seems to be caused by incorrectly using week 201253 instead of week 201301. All dates I have tried after this week report one week too low.
select yearweek('2012-12-31') - returns 201253 instead of 201301
We report weekly statistics and now just discovered that all of 2013 and 2014 are one week off. Using Microsoft SQL we get the correct week numbers, but that's not an option right now.
Gliffy Diagrams
Attachments
Issue Links
Activity
- All
- Comments
- Work Log
- History
- Activity
- Transitions
Note the discussion here; the behaviour of the week() and yearweek() functions is designed to be dependent on the default_week_format system variable.
http://bugs.mysql.com/bug.php?id=71827