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!

Passing a Date to a stored procedure 1

Status
Not open for further replies.

fpgiv

Programmer
Oct 1, 2003
91
0
0
US
Hi,
I'm new to using stored procedures, and I want to pass a date as a parameter. I'm using ASP, and my function call looks like:
et_uiteststartend 147,1, 6/17/2004, 1/6/2005

When I execute this function, I get the error Incorrect syntax near '/'.

Can anyone help?
Thanks!
 
Wrap the dates in single quotes. SQL will implicitly convert the string to a date as long as its in one of the acceptable formats. Check out dates, formats in BOL.

Code:
et_uiteststartend 147,1,'6/17/2004','1/6/2005'


--John [rainbow]
-----------------------------------
Behold! As a wild ass in the desert
go forth I to do my work.
--Gurnie Hallock (Dune)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top