# DataFormatString Not Working? Here is the Fix

If you have a GridView control and are are trying to data format a BoundField, you may find your format instructions are being ignored. The fix is to add HtmlEncode="False" to the asp:BoundField. Then the DataFormatString should work.
<asp:BoundField DataField="LastModified"
DataFormatString="{0:d}" />