My web form contains a textbox where users need to input date (dd/mm/yy), I am using a parameterized stored procedure to update my SQL DB table, but I am facing a problem with the date format in the code below:
objParam = myCommand.Parameters.Add("@ETD", SqlDbType.DateTime)
objParam.Direction = ParameterDirection.Input
objParam.Value = ETD.Text
My browser return the following error:
Cast from string "28/10/04" to type 'Date' is not valid.
How can I ensure that the DB will accept the "28/10/04" date format when the stored procedure fires?
I need some help here.