Formating date in asp.net1.1 datagrid.

Some time we need to display the dates in data grid. And we have to format it as per the requirement.

here is the way to format link in the data grid.

First Select data grid and open property window by pressing f4. Then go to the.
Click on the property builder then click the columns and select the column which you
want to display in date format.

Then go to the data formating expression text box and paste the following code.
{0:dd/MM/yyyy}

compile the application and now data will be display in dd/MM/yyyy format.

Here you can specify any valid format for date.

Comments

Popular posts from this blog

How to create Rest API(Web API) with ASP.NET Core 1.0

Creating PDF with ASP.Net MVC and RazorPDF

Solution: gulp is not recognized as internal or external command- Visual Studio