SqlDbType.Date


string dobStr = ddlMonth.SelectedValue + "/" + txtDay.Text + "/" + txtYear.Text;
SqlParameter dob = new SqlParameter("DOB", Convert.ToDateTime(dobStr));
dob.SqlDbType = SqlDbType.Date;
cmd.Parameters.Add(dob);

Comments

Popular posts from this blog

SQL: GROUP BY And HAVING

Installing AdventureWorks Sample Databases from Microsoft

ASP.NET MVC 5 From Scratch : Add JQuery UI Library Using NuGet