s have found the way to get start date and end date of previous week with the help of the date part function of SQL Server 2005. It also work on sql server 2000 also.
Following are the code for finding start date and end date of previous week.
Set @STimeStamp=GETDATE()
set @PStartDate=@STimeStamp-DATEPART(dw,@STimeStamp)-6
set @PEndDate=@STimeStamp-DATEPART(dw,@STimeStamp)
Happy Programming
Thursday, February 1, 2007
This is awesome code. Thanks a ton for the post.
ReplyDeleteThis code is very helpful. Keep up the good work.
ReplyDeletethis code is really helpful, thanks a lot
ReplyDelete