title: How to bind a grid in column in date time in particular format
body: <p>I'm trying to bind grid in C# using XML as data source</p>
  
  <pre><code>string sApplication = txtApplicationsta.Text.Trim();
  if (sApplication=="")
  { 
       DataSet ds3 = new DataSet();
       ds3.ReadXml(Server.MapPath("Status.xml"));
       if (ds3.Tables[0].Rows.Count != 0)
       {
            gvstatus.DataSource = ds3;
            gvstatus.DataBind();
       }
  }
  </code></pre>
  
  <p>The data is bound successfully. I'm saving the date format as <code>YYYY-MM-DD</code>.</p>
  
  <p>Like below:</p>
  
  <pre><code>string idate = DateTime.Parse(ssplit[4].Trim()).ToString("yyyy-mm-dd", CultureInfo.InvariantCulture);
  </code></pre>
  
  <p>Now I need to bind my grid column in <code>DD-MM-YYYY</code> Format but in grid its getting Bind by what I save.</p>
  
  <p>I am binding the grid in Asp page like this:</p>
  
  <pre><code>&lt;asp:TemplateField HeaderText='Last Update' HeaderStyle-VerticalAlign="Middle"&gt;
      &lt;HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" CssClass="chkbox" /&gt;
      &lt;ItemTemplate&gt;
           &lt;asp:Label ID="lblFirstName" runat="server" att='&lt;%#DataBinder.Eval(Container.DataItem,"ID")%&gt;' Text='&lt;%# SetLinkCodestatus(Convert.ToInt64(DataBinder.Eval(Container.DataItem,"ID")),DataBinder.Eval(Container.DataItem,"LastUpdate").ToString()) %&gt;'&gt;&lt;/asp:Label&gt;
      &lt;/ItemTemplate&gt;
      &lt;ItemStyle Width="3%" HorizontalAlign="left" /&gt;
  &lt;/asp:TemplateField&gt;
  </code></pre>
  
  <p>How can I bind the grid using <code>DD-MM-YYYY</code> format if I'm saving the value in <code>YYYY-MM-DD</code> format?</p>