objcmd.Parameters.Add = 3 Pulldown Values

Posted on 2006-03-31
Last Modified: 2008-03-06
I want this:
objcmd.Parameters.Add("@SDOB", SqlDbType.DateTime).Value =

to equal the values from my three pulldowns:

in this format:


How would I do that?

I'm thinking maybe something like this:
objcmd.Parameters.Add("@SDOB", SqlDbType.DateTime).Value = bdaymonth.SelectedValue + bdayday.SelectedValue + bdayyear.SelectedValue

Question by:net_susan
    LVL 24

    Accepted Solution

    Or you could do something like:

    objcmd.Parameters.Add("@SDOB", SqlDbType.DateTime).Value = String.Format("{0}/{1}/{2}", bdaymonth.SelectedValue, bdayday.SelectedValue, bdayyear.SelectedValue)

    And if you wanted it to be in a DateTime format then you would just wrap it with


    LVL 1

    Author Comment

    Groovy. :)

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
    Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
    Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
    This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

    745 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now