Displaying Date in DataGrid
Hi All,
i'm displaying a date field along with other fields in datagrid. while i tried, i'm able to get all the values from the table, also the date field. but it is displaying along with the time
Ex : for "2/25/2005" i'm getting "2/25/2005 12:00:00 AM"
i use dataadapter to fill the datagrid.
can any one help me
thanx
venkat
Re: Displaying Date in DataGrid
hi,
In the design mode go to the Datagrid - Property builder, go to the columns section and select the Data Field which you have, there on the lower side you can see the "data Formating expression" box.
Enter the Format you want the Datagrid to display
For example:
{0:d} will display Date in Short date format
Re: Displaying Date in DataGrid
Thanks John,
Its working fine... Is there any way to display like 09-Apr-2005...
venkat
Re: Displaying Date in DataGrid
Change the format string to:
{0:dd-MMM-yy}