kcwallace
Well-known member
I am using the following to generate a field in a gridview. Is there a way to format the data? specifically this is a returned date of 1/1/2007, but it displays the 1/1/2007 12:00. I need to drop the 12:00. THe backend is SQL Server 2005. Do I need to format it there?
Code:
<asp:TemplateField HeaderText="SD" SortExpression="StartDate">
<ItemTemplate>
<asp:Label ID="Label15" runat="server" Text=<%# Bind("startdate") %>></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="txtStartDate" runat="server" Text=<%# Bind("startdate") %>></asp:TextBox>
</EditItemTemplate>
<FooterTemplate>
<asp:TextBox ID="txtStartDate" runat="server" Text=""></asp:TextBox>
</FooterTemplate>
</asp:TemplateField>