title: C# to Excel set custom date display and value
body: <p>Given a certain date, I want to set the <strong>value</strong> of a cell with a DateTime object, but without the "Time" information. For example, for today the value would just be <strong>"29/06/2012"</strong> and not <strong>"29/06/2012 16:54:36"</strong>.</p>
  
  <p>Concerning the display, for today's date I want it to be written like this (it is in french, I don't know how it would be in english): <strong>"29 juin"</strong> and not <strong>"29/06/2012"</strong>.</p>
  
  <p>How can I achieve this?</p>
  
  <p><strong>EDIT</strong> : I just took a look at the display formatting I need in Excel, it is "jj mmmm" ("dd mmmm" in C#). But the cell, though taking the value, does not take the formatting. Here is a piece of code:</p>
  
  <pre><code>                 cell.Value = string.Format("{0:dd/MM/yyyy}", DateTime.Now);
                   cell.NumberFormat = "jj mmmm";
  </code></pre>
  
  <p>I also tried:</p>
  
  <pre><code>                 cell.Value = DateTime.Now;
                   cell.NumberFormat = "jj mmmm";
  </code></pre>
  
  <p>In that case, the display formatting is OK, but the cell value contains the Time information, which is not OK.</p>