Where condition is drpDate in sql 2005
I Found an error when the time of filling in grid.parameter passing as datetimein sql 2005.i dont know how to convert datetime to string and remaining parameters passing as string.give example with code... SqlDateTime overflow. Must be between 1/1/1753 12:00:00 AM and 12/31/9999 11:59:59 PM.
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Sunny SharmaRank #223 · 11.1K reputationPosted Jul 11, 2013, 3:09 AM EDT
I assume you're doing so in C#.
Convert the DateTime value to string like this:
str dateStr = myDateTime.ToString("yyyy-MM-dd");
Hope it helps.
Cheers!
Iftikar HussainRank #423 · 5.9K reputationPosted Jul 11, 2013, 7:20 AM EDT
Please validate the input date before inserting into sql.
Regards,
Iftikar
Ravi ShekharRank #673 · 3.6K reputationPosted Jul 17, 2013, 2:10 AM EDT
check http://www.blackwasp.co.uk/SQLDateTimeFormats.aspx
I am suggesting you to use 101 code .