Tech Junkie Blog - Real World Tutorials, Happy Coding!: SqlDbType.Date

Sunday, June 19, 2016

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);

Next: ASP.NET: Getting The Inserted ID Back With Scope_Identity()

2 comments:

  1. Thanks for sharing informative content…Find noida software company to know more and Contact us on given no.…

    ReplyDelete
  2. Thanks for sharing this.,
    Leanpitch provides online training in A-CSPO during this lockdown period everyone can use it wisely.
    Join Leanpitch 2 Days A-CSPO Certification Workshop in different cities.

    a-cspo certification
    a-cspo training

    ReplyDelete

Search This Blog