Thursday, September 10, 2009

Format Date in GridView

I always forget how to do this one. If you need to format a date a certain way in a
GridView, try this out:

<asp:BoundField DataField="the_date" HeaderText="Date" DataFormatString="{0:MM/dd/yyyy}" HtmlEncode="false" />

No comments:

Post a Comment