the display of the date and time

DeTHz

New Member
when i retrieve the date from from the database and display it in the data grid, the date is displayed correctly but the time is always showing 12:00:00 AM.Actually i just want the date only but the time keep coming out after the date!Do anyone here know how to fix it?Thank you!In your datagrid bound column for the date, enter the DataFormatString property as shown below. It will show a standard short-date (12/15/2001).<BR><BR> <ASP:BoundColumn <BR> HeaderText = "Date" <BR> DataField = "rDate"<BR> DataFormatString = "{0:d}"<BR> SortExpression = "rDate" ><BR> <ItemStyle Width = "60" /><BR></ASP:BoundColumn><BR><BR>Tom T
 
Back
Top