Hi,
I set HtmlEncode="False" and DataFormatString="{0:mm/dd/yyyy}" in boundfield of a gridview but the month became 00 (18/00/2008). After removing {0:mm/dd/yyyy} from DataFormatString, the month appeared again (2008-09-18 12:00:00 AM) of course together with the time portion that I wish to get rid of.
Please help. BTW, whart is {0} stands for? Or just a syntax?
<asp:BoundField DataField="EstimateCompleteDate" HeaderText="EstimateCompleteDate"
SortExpression="EstimateCompleteDate" DataFormatString="{0:mm/dd/yyyy}" HtmlEncode="False" />
<asp:BoundField DataField="ActualCompleteDate" HeaderText="ActualCompleteDate" SortExpression="ActualCompleteDate" DataFormatString="{0:mm/dd/yyyy}" HtmlEncode="False" />
Thanks in advance.