8 May 2014

DateTime Format in gridview column



    <asp:GridView ID="gv_1" runat="server" AutoGenerateColumns="false">
        <Columns>
            <asp:TemplateField HeaderText="Color">
                <ItemTemplate>
                    <asp:Label ID="lbl_date" runat="server" Text='<%# Eval("Your_Date_Column_name", "{0:MMMM d, yyyy}") %>' />
                </ItemTemplate>
            </asp:TemplateField>
        </Columns>
    </asp:GridView>

No comments:

Post a Comment