title: How to change the format of a column in GridView from c#
body: <p>I have a GridView and I want to export it to Word. I want to change the format of one column to datetime format ("dd.MM.yyyy")</p>
  
  <pre><code>var grid = new GridView { DataSource = dt};
  grid.DataBind();
  </code></pre>
  
  <p>In *.aspx page this is very easy, it looks like in the example below:</p>
  
  <pre><code>&lt;asp:boundfield datafield="My_Date_Column"
                  dataformatstring="{0:dd.MM.yyyy}"
                  htmlencode="false" /&gt;
  </code></pre>
  
  <p>I want change format from c#, how to do this?</p>