Hi,
'm using a GridView in my website. I want to display DateTime Values using the format "dd/MM/yy". The Problem is that my WebGrid displays some data correctly but not all of them
(Jan 30 2008) is displayed "01-01-08"
(Feb 04 2008) is displayed "02-04-08"
Some code snippets :
<asp:gridview id="invoicesGridView" ..../ > <columns> <asp:boundfield datafield="CmdDate" headertext="Date" sortexpression="Date" DataFormatString="{0:dd/MM/yy}" HtmlEncode="False"> .... </asp:boundfield>
Note : When I tried to set HtmlEncodeFormatString to "False", my web page returns the error message :
Type 'System.Web.UI.WebControls.BoundField' does not have a public property named 'HtmlEncodeFormatString' !!!
Thanks in advance.
Rédha.
modified on Monday, February 04, 2008 10:17:28 AM