Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Displaying short date format in GridView
Message
De
06/10/2010 16:13:54
 
 
À
06/10/2010 15:22:17
Timothy Bryan
Sharpline Consultants
Conroe, Texas, États-Unis
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
01484208
Message ID:
01484242
Vues:
21
>>Hi,
>>
>>I am trying to display just the date part of a datetime field in a gridview, but the time is always displayed. Can anybody see anything wrong with this?
>>
>>
<ItemTemplate>
>>     <mm:mmLabel ID="lblDOB" runat="server" DisplayFormat="{0:d}" CssClass="date" Text='< %# Bind("DateOfBirth") % >'></mm:mmLabel>
>></ItemTemplate>
>
>Frank, see if there is an HtmlEncode property for the column. You will need to set that to false.
>Tim


I got it working like this:
Bind("DateOfBirth", "{0:d}")
Thanks, googling for htmlencode and dateformat worked.
Frank.

Frank Cazabon
Samaan Systems Ltd.
www.samaansystems.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform