Format dates in GridView column
Wednesday 22 April 2009
To format the date results in a GridView column, use the below code:
- DataFormatString="{0:dd/MM/yyyy}"
An example of this in use is:
- <asp:BoundField DataField="Date" DataFormatString="{0:dd/MM/yyyy}" HeaderText="Date"
- SortExpression="Date" />
|
(0)
|
|
|