May 27, 2009 at 2:40 pm
Lynn Pettis (5/27/2009)
select dateadd(wk, datediff(wk, 0, dateadd(dd, -1, @ThisDate)), 0);
Nice one...
As simple as efficient. 🙂
Thanxalot, Lynn.
May 27, 2009 at 2:43 pm
lmu92 (5/27/2009)
Lynn Pettis (5/27/2009)
select dateadd(wk, datediff(wk, 0, dateadd(dd, -1, @ThisDate)), 0);
Nice one...
As simple as efficient. 🙂
Thanxalot, Lynn.
Curious, where in Germany. My daughter is over there for a week. I think she landed in Frankfurt (sp??).
May 27, 2009 at 4:03 pm
would this solution help (based on one of Lynn's date routines)?
declare @wk int
set @wk =22
select dateadd(wk, datediff(wk, 0, dateadd(dd,(@wk-1)*7,'20090101')), 0)
/* result
2009-05-25 00:00:00.000
*/
Viewing 3 posts - 16 through 17 (of 17 total)
You must be logged in to reply to this topic. Login to reply