Format dates in GridView column




Format dates in GridView column To format the date results in a GridView column, use the below code:
  1. DataFormatString="{0:dd/MM/yyyy}" 
An example of this in use is:
  1. <asp:BoundField DataField="Date" DataFormatString="{0:dd/MM/yyyy}" HeaderText="Date"  
  2. SortExpression="Date" />


No one has said that they like article yet, be the first and click here (0)
Send a link to this page via email Send a link to this page