We help IT Professionals succeed at work.

Execute Stored Procedure with date variable

Medium Priority
Last Modified: 2012-05-11
Hello Folks,

I have created a Stored Procedure in MS Management Studio in a MS SQL Server 2008. The SP required a input parameter called @InputDate.
The input date is defined as:

@InputDate as datetime = '1753-01-01 00:00:000'

When I right-click the SP and click Execute Stored Procedure Studio Management gives me:

 Screen shot from Mangament Studio
When I click OK it gives me the following error message:

Msg 8114, Level 16, State 5, Procedure CustomerWebServiceGetByDate, Line 0
Error converting data type nvarchar to datetime.

(1 row(s) affected)

So I know that I don't parse the correct value.
Can somebody please help me with the correct value to parse?

Watch Question

Software Engineer
Unlock this solution and get a sample of our free trial.
(No credit card required)


Year, now it seems so obvious :-D
Thanks a bunch!  
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.