Link to home
Start Free TrialLog in
Avatar of Madsing
MadsingFlag for Denmark

asked on

Execute Stored Procedure with date variable

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:


 User generated image
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?


 
ASKER CERTIFIED SOLUTION
Avatar of Ephraim Wangoya
Ephraim Wangoya
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Madsing

ASKER

Year, now it seems so obvious :-D
Thanks a bunch!