Compute date from year, week, 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       |
+------------+
| 2024-06-24 |
+------------+

Last updated 1 Jul 2024