title: How to store the values in DateTime object from ComboBox c#
body: <p>My question is: I have three ComboBox. One for days, months and years.
  How to store the values that I selected in DateTime object when I press the button?</p>
  <p><a href="https://i.stack.imgur.com/JIQzd.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/JIQzd.png" alt="enter image description here" /></a>
  Note: I don't want to store in the database, it just in the object.</p>
  <p>and I try this but it definitely doesn't work</p>
  <pre><code>private void Form1_Load(object sender, EventArgs e)
          {
       comboBox1.Items.Add(&quot;Jan&quot;);
       comboBox1.Items.Add(&quot;Feb&quot;);
       comboBox1.Items.Add(&quot;Mar&quot;);
  }
  </code></pre>
  <p>--</p>
  <pre><code> private void button1_Click(object sender, EventArgs e)
          {
              DateTime DT = new DateTime();
  
              DT = comboBox1.Text;
  }
  </code></pre>