title: How do I change the date format of a DataBinder.Eval in asp.net?
body: <p>I'm trying to figure out how to change the datetime format so just the date will show up.</p>
  
  <pre><code>            &lt;asp:Repeater ID="RepeaterActions" runat="server"&gt;
              &lt;ItemTemplate&gt;
                  &lt;li&gt;
                      &lt;span class="historyDate"&gt;&lt;%#DataBinder.Eval(Container.DataItem, "ActionListDate")%&gt;&lt;/span&gt;
                      &lt;span class="historyName"&gt;&lt;%#DataBinder.Eval(Container.DataItem, "LeadActionName")%&gt;&lt;/span&gt;&lt;br /&gt;
                      &lt;span class="historyNotes"&gt;&lt;%#DataBinder.Eval(Container.DataItem, "ActionListNote")%&gt;&lt;/span&gt;
                  &lt;/li&gt;
              &lt;/ItemTemplate&gt;
          &lt;/asp:Repeater&gt;
  </code></pre>
  
  <p>I'm guessing it's something in between the &lt;% %>, but I'm not sure.</p>
  
  <p>My code behind is:</p>
  
  <pre><code>&lt;pre&gt;
          protected void RepeaterActionsFill()
      {
  
          string sql = @"  select a.ActionListDate, a.LeadListID, 
  a.ActionListNote, 
  l.LeadActionName
  from ActionLists as a
  INNER JOIN LeadActions as l
  ON a.LeadActionID = l.LeadActionID
  where a.LeadListID = " + Convert.ToInt32(Request["id"].ToString());
  
          RepeaterActions.DataSource = DBUtil.FillDataReader(sql);
          RepeaterActions.DataBind();
      }
  &lt;/pre&gt;
  </code></pre>
  
  <p>Currently, it comes accross looking like this:</p>
  
  <p><img src="https://i.stack.imgur.com/BwRgb.png" alt="HTML View"></p>
  
  <p>And what I'm looking for is for the time stamp to be gone there.</p>
  
  <p>Any help is appreciated.</p>
  
  <p>EDIT:</p>
  
  <p>Here is what I was looking for:</p>
  
  <pre><code>            &lt;asp:Repeater ID="RepeaterActions" runat="server"&gt;
              &lt;ItemTemplate&gt;
                  &lt;li&gt;
                      &lt;span class="historyDate"&gt;&lt;%#DataBinder.Eval(Container.DataItem, "ActionListDate", "{0:M/d/yy}")%&gt;&lt;/span&gt;
                      &lt;span class="historyName"&gt;&lt;%#DataBinder.Eval(Container.DataItem, "LeadActionName")%&gt;&lt;/span&gt;&lt;br /&gt;
                      &lt;span class="historyNotes"&gt;&lt;%#DataBinder.Eval(Container.DataItem, "ActionListNote")%&gt;&lt;/span&gt;
                  &lt;/li&gt;
              &lt;/ItemTemplate&gt;
          &lt;/asp:Repeater&gt;
  </code></pre>