19 messages in com.mysql.lists.bugsRe: bug in WEEK function
FromSent OnAttachments
Mark D. Anderson16 Aug 2001 11:47 
Michael Widenius17 Aug 2001 00:56 
Mark D. Anderson17 Aug 2001 09:28 
Michael Widenius18 Aug 2001 01:02 
Mark D. Anderson18 Aug 2001 10:50 
Michael Widenius20 Aug 2001 03:47 
Mark D. Anderson20 Aug 2001 09:21 
Michael Widenius21 Aug 2001 01:40 
Timothy Smith21 Aug 2001 08:15 
Mark D. Anderson21 Aug 2001 10:06 
Timothy Smith21 Aug 2001 15:51 
Mark D. Anderson21 Aug 2001 16:50 
Michael Widenius22 Aug 2001 14:30 
Michael Widenius22 Aug 2001 14:31 
Mark D. Anderson22 Aug 2001 16:04 
Sasha Pachev22 Aug 2001 18:25 
Michael Widenius26 Aug 2001 11:38 
Mark D. Anderson26 Aug 2001 13:25 
Michael Widenius28 Aug 2001 03:43 
Subject:Re: bug in WEEK function
From:Michael Widenius (mon@mysql.com)
Date:08/26/2001 11:38:57 AM
List:com.mysql.lists.bugs

Hi!

"Mark" == Mark D Anderson <md@discerning.com> writes:

Mark> how-to-repeat Mark> (resending now that i know the trick to get past the spam filter).

Mark> ok, so to summarize: Mark> YEAR(,0) - should be %U, but isn't, a patch is coming Mark> YEAR(,1) - is not %W but is allegedly "how weeks are calculated here in
Scandinavia" Mark> YEARWEEK(,0) - not useful

What do you mean that the above is not useful ?

It will return the correct year and week for any given date in USA and is for example useful when you want to produce calculations based on weeks, for example:

SELECT yearweek(date,0) as yw ,sum(summary_col) from table_name group by yw;

To do the above, without having the current definition of yearweek(#,0), would be cumbersome.

Regards, Monty