Home All Groups Group Topic Archive Search About
Author
8 Apr 2006 7:48 PM
Steve
I have a gridview bound to a SQL Server table. One of my columns is bound to
a datetime field. I set the column's dataformatstring property to
{0:yy-MM-dd} or {0:d} or {0:D} it doesn't matter. The dates are shown as
4/8/2006 12:00:00 AM. I want the date only but I can't supress the time. The
Gridview.autogeneratecolumns = false if that matters. Any suggestion would
be greatly appreciated.

Thanks.

Author
8 Apr 2006 7:56 PM
Teemu Keiski
Hi,

set HtmlEncode="False" to the BoundColumn

--
Teemu Keiski
ASP.NET MVP, AspInsider
Finland, EU
http://blogs.aspadvice.com/joteke

Show quoteHide quote
"Steve" <Steve@nospam.com> wrote in message
news:uLBvgV0WGHA.4976@TK2MSFTNGP03.phx.gbl...
>I have a gridview bound to a SQL Server table. One of my columns is bound
>to a datetime field. I set the column's dataformatstring property to
>{0:yy-MM-dd} or {0:d} or {0:D} it doesn't matter. The dates are shown as
>4/8/2006 12:00:00 AM. I want the date only but I can't supress the time.
>The Gridview.autogeneratecolumns = false if that matters. Any suggestion
>would be greatly appreciated.
>
> Thanks.
>
>
Author
8 Apr 2006 8:56 PM
Steve
Works great. Thanks so much!

Show quoteHide quote
"Teemu Keiski" <jot***@aspalliance.com> wrote in message
news:uXmSDa0WGHA.4148@TK2MSFTNGP03.phx.gbl...
> Hi,
>
> set HtmlEncode="False" to the BoundColumn
>
> --
> Teemu Keiski
> ASP.NET MVP, AspInsider
> Finland, EU
> http://blogs.aspadvice.com/joteke
>
> "Steve" <Steve@nospam.com> wrote in message
> news:uLBvgV0WGHA.4976@TK2MSFTNGP03.phx.gbl...
>>I have a gridview bound to a SQL Server table. One of my columns is bound
>>to a datetime field. I set the column's dataformatstring property to
>>{0:yy-MM-dd} or {0:d} or {0:D} it doesn't matter. The dates are shown as
>>4/8/2006 12:00:00 AM. I want the date only but I can't supress the time.
>>The Gridview.autogeneratecolumns = false if that matters. Any suggestion
>>would be greatly appreciated.
>>
>> Thanks.
>>
>>
>
>