Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Datepart

Status
Not open for further replies.
Mar 9, 2006
4
0
0
GB
SQL Server 2005

Hi All,

Being a bit blonde here, but i have a problem I hope you can help me with.

I have a stored procedure that has a Date parameter that is fed in. For a calculation I want to use this date like this

Tran_date <= day(01) & datepart(month,@date)-1 & datepart(year,@date)

i.e find all transactions before the first of the previous parameter month, is there an easier way to do this.

Thanks in advance
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top