title: How to format the Gridview column which has DateTime value at runTime
body: <p>I am using this code to bind the data to the datagrid. I am creating a Datagrid at runtime and don't want to create the Gridview in design time. And I cannot use the <code>RowDataBound</code> event. Is there any means by which we can format the column such that I will get only date not the time.</p>
  
  <pre><code>OleDbDataAdapter da = new OleDbDataAdapter(cmd);
  da.Fill(dt);
  GridView GridView1 = new GridView();
  GridView1.DataSource = dt;
  GridView1.DataBind();
  </code></pre>
  
  <p>There is one column in Gridview named as <code>MyDate</code> which is showing the data as <code>12/12/2010 with Time</code>. I wanted to remove the time.</p>
  
  <p>I wanted to use something like <code>DataFormatString="{0:d/M/yyyy}"</code>.</p>