title: How to convert DateTime? to DateTime
body: <p>I want to convert a nullable DateTime (<code>DateTime?</code>)  to a <code>DateTime</code>, but I am getting an error:</p>
  
  <blockquote>
    <p>Cannot implicitly convert type 'System.DateTime?' to
    'System.DateTime'. An explicit conversion exists (are you missing a
    cast?)</p>
  </blockquote>
  
  <p>I have attempted the following:</p>
  
  <pre><code>DateTime UpdatedTime = (DateTime)_objHotelPackageOrder.UpdatedDate == null 
      ? DateTime.Now : _objHotelPackageOrder.UpdatedDate;
  </code></pre>