Compute date from year, week number and weekday

from the Artful Common Queries page


SET @yr=2012, @wk=26, @day=0;
SELECT Str_To_Date( Concat(@yr,'-',@wk,'-',If(@day=7,0,@day) ), '%Y-%U-%w' ) AS Date;
+------------+
| Date       |
+------------+
| 2012-06-24 |
+------------+

Return to the Artful Common Queries page