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!

SQL 2008 Stored Procedure date parameter

Status
Not open for further replies.

jchewsmith

Technical User
Nov 20, 2006
160
0
0
US
I am trying to pass a date parameter to my sql stored procedure.

@BeginDate Date,
@EndDate Date

Select *
From table
Where [invoice Date] between @begindate and @enddate

I want to be able to enter into the parameter window
BeginDate 10/01/2015
EndDate 10/31/2015

but I am being forced to enter '10/01/2015' and '10/31/2015' for the process to work.

 
Can the procedure be changed? CR will recognize the SP parameters as actual dates, rather than strings, if you define them in the SP as DateTime type rather than Date.

~Brian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top