Posted on: 6/17/2013 6:28:55 PM | Views : 489

OK.  This should be simple enough.  I am pulling from a SQL Server database table.  One of the fields is simply defined as "Date".  When diplayed in the GridView, it comes out as DateTime.  So the db table has "12/31/2012" but the GridView has "12/31/2012 12:00:00 AM". 
I simply want to display the DATE, not any default time.  I've tried a few solutions but nothing seems to make a difference.  Any pointers?
<asp:GridView...etc..> <asp:BoundField DataField="ExpirationDate" HeaderText="Expiration Date" SortExpression="ExpirationDate" /> ...etc
 
I've tried adding:
 <asp:BoundField DataField="ExpirationDate" htmlencode="true" (and false) DataFormatString="{0:d}" .... />
.....DataFormatString="{0:MM/dd/yyyy hh:mm tt}" />
... Text ...

Go to the complete details ...