DotNetJaps

For the ASP.NET,By the ASP.NET and Of the ASP.NET

Sponsors

News


My Another Blog

Previous week startdate and enddate in sql server 2000,sql server 2005

Following are the some tricky code to find previous week startdate and enddate in sql server 2000/2005

 

Set @STimeStamp=GETDATE()
set @PStartDate=@STimeStamp-DATEPART(dw,@STimeStamp)-6
set @PEndDate=@STimeStamp-DATEPART(dw,@STimeStamp)

Comments

Arun Pal said:

Thanks man. It works

# May 13, 2008 3:44 AM
Leave a Comment

(required) 

(required) 

(optional)

(required)