error converting datatype
Good morning
I have this 2 lines to get the date time
txtdate.Text= DateTime.Now.Date.ToString();
string dt = Convert.ToDateTime(txtdate.Text).ToString();
and i pass it to the stored procedure as parameter as following :
cmd.Parameters.AddWithValue("@Reg_Date", dt);
when it reach the cmd.ExecuteNonQuery();
it will stop and give the error :
Error converting data type nvarchar to datetime
thanks in advance