title: asp.NET and SQL Server datetime issues
body: <p>I am having hard time to store date information into the datetime column of SQL Server.</p>
  
  <p>I get the input from the user for three columns:</p>
  
  <ol>
  <li>Creation Date</li>
  <li>Preparation Date</li>
  <li>Next Preparation Date</li>
  </ol>
  
  <p>I use calendarextender and format the date as "yyyy/MM/dd". When all the fields have date, they are stored in the DB as for instance, 16-10-2016 (dd-MM-yyyy).</p>
  
  <p>At this point I have two issues:</p>
  
  <ol>
  <li><p>These columns are optional, when some of them are empty my code does not work (I assume because datetime cannot be null). To overcome this, I am using the following code snippet but still does not work.</p>
  
  <pre><code>DateTime? creationDate= null;
  
  if (creationDateTextbox.Text != null &amp;&amp; creationDateTextbox.Text != "")
  {
      creationDate= Convert.ToDateTime(creationDateTextbox.Text);
  }
  </code></pre></li>
  <li><p>When I fetch the dates from DB, they are shown as 10/16/2016 (MM-dd-yyyy) which is different how I formatted it. I would like to show it in the format user enters them.</p></li>
  </ol>