title: Get only the date from a datetime in c#
body: <p>I'm trying to pass a date in a viewbag like this</p>
  
  <pre><code>DateTime? DueDate = this.dbContext.OBProcessMonitors.Where(o =&gt; o.EmployeeID 
  == GlobalVariables.EmployeeID).First().DueDate;
          ViewBag.DueDate = DueDate;
  </code></pre>
  
  <p>WHen i call the viewbag in razor <code>@viewbag.duedate</code> i get the date and time.  How can I get just the date out of it?</p>