Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

format a date column in a datagrid

Status
Not open for further replies.

conjurer111

Programmer
Aug 11, 2002
76
IN
Hi,

I have a date column in a datagrid which displays the date as date time. How do I format it. I've seen a format column in the datagrid properties but can't seem to make it work. Thanks.
 
<asp:BoundColumn DataField=&quot;LastDate&quot; HeaderText=&quot;Last Date&quot; DataFormatString=&quot;{0:d}&quot; ItemStyle-width=&quot;40px&quot; Sortexpression=&quot;LastDate&quot;/>

This is a row from a datagrid where sotring is taking place, but the format should work
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top