Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Nov 15, 2012 07:29 PM by Curt_C
Nov 15, 2012 05:24 PM|LINK
How do you pass a date parameter with value '1753-01-01 00:00:00.000' to a stored procedure using C#?
I tried DateTime.MinValue, but that doesn't work.
Nov 15, 2012 05:26 PM|LINK
That isn't DateTime.MinValue, that's why.
Just pass it as a string, SQL should interpret it fine.
Nov 15, 2012 05:29 PM|LINK
I know, I tried MinValue and when the program calls the SP, I get:
SqlDateTime overflow. Must be between 1/1/1753 12:00:00 AM and 12/31/9999 11:59:59 PM.
Nov 15, 2012 06:25 PM|LINK
Nov 15, 2012 07:29 PM|LINK
You're using .NET Datetime, use SQLDateTime instead