Viewing 3 posts - 1 through 3 (of 3 total)
Thanks to a friend of mine:
Declare @lastSunday datetime
Declare @cDate datetime
Set @cDate = GETDATE()
Set @lastSunday = dateadd(d,-6,dateadd(d,(7 - datepart(dw,@cDate)),@cDate))
PRINT @lastSunday
August 14, 2003 at 1:34 pm
#470016
quote:DECLARE @LockDateBegin SMALLDATETIMESELECT @LockDateBegin = CASE WHEN (DATEPART(dw, GETDATE() = 3 ...
quote:
SELECT @LockDateBegin =
CASE
WHEN (DATEPART(dw, GETDATE() = 3
...
August 14, 2003 at 11:32 am
#470003
Anytime a programming dilama seems impossible to be solved, I remind myself "There has to be a way to solve it". And I found a way each time.
April 15, 2002 at 7:29 am
#427202