Format Date Values Shown In Label Control Inside An ASP.NET Web Forms Gridview
Reference: Set Date Format in Gridview
To format date as short date format of a label control inside a template field use Bind() as shown below:
To format date as short date format of a label control inside a template field use Bind() as shown below:
1: <ItemTemplate> 2: <asp:Label id="lblDateRec" runat="server" Text='<%# 3: Bind("GeneratedDateRec", "{0:MM/dd/yyyy}") %>'></asp:Label> 4: </ItemTemplate>
Comments
Post a Comment