Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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?

 

<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>

Go Beavs!!!

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...