Simon,
You have to disable the HtmlEncoding of the column, which is set to true by
default.
Here's an example of a price column I wanted to format as currency with no
decimal. The format won't be used unless HtmlEncode is set to "False".
<asp:BoundField DataField="Price" DataFormatString="{0:c0}"
HtmlEncode="False" HeaderText="Price" SortExpression="Price" />
--
Sincerely,
S. Justin Gengo, MCP
Web Developer / Programmer
www.aboutfortunate.com
"Out of chaos comes order."
Nietzsche
"thechaosengine" <> wrote in message
news: m...
> Hi all,
> I'm having trouble getting dates to display in the right format in my
> GridView.
>
> I'd like it to appear in the UK format - just the date, not the time, but
> I'm not having any luck.
>
> Someone suggested i try DataFormatString="{0:dd-mm-yyyy}" on the
> appropriate column however that still outputs 24/04/2006 00:00:00
>
> Can anyone suggest how to get rid of the time element?
>
> Many thanks all
>
> Simon
>
>