dalings functie dbo.weekXMonday
ga
cre�ër functie dbo.weekXMonday (@year int., @weekno int.)
winst datetime zoals
begin
verklaar datetime @d
plaats @d=dateadd (yy, @year-1900, 0)
terugkeer (dateadd (week, @weekno-1, @d) - ((datepart (dw, @d-2) +@@datefirst) %7))
terugkeer @d
eind
GA
selecteer dbo.weekXMonday (2009.34)
selecteer dbo.weekXMonday (2010.34)
|