At 11:10 +0000 1/14/02, trevor hemsley wrote: > >Description: > Run SELECT WEEK(SUBDATE("2002-01-07 03:30:00", INTERVAL 7 >DAY), 1) and it wrongly returns 53.
Why is that incorrect? The date you have specified occurs on Dec. 31 of the previous year? > >How-To-Repeat: > SELECT WEEK(SUBDATE("2002-01-07 03:30:00", INTERVAL 7 DAY), 1); >>Fix: > Correct result returned by querying the thursday of that week >instead, ie. > SELECT WEEK(SUBDATE("2002-01-07 03:30:00", INTERVAL 4 DAY), 1); I'd expect that. This date occurs at the beginning of 2002. --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php