I have the following code which worked fine on a .net 1.1 website:
objSQLCommand.Parameters.Add(New SqlParameter("@date", SqlDbType.DateTime, 8))
objSQLCommand.Parameters("@date").Value = txtDate.Text
This doesn’t work on a .net 3.5 server.
I’m getting a message saying that it can’t convert a string to datetime.
Try this one,
follow-up question, what is the format of the date in your textbox? Maybe you can take advantage of
TryParseorParseExactalso.