---
title: "Change date format in gridview"  
description: "Change date format in gridview"  
author: "Anonymous User"  
published: 2017-12-14  
updated: 2017-12-14  
canonical: https://www.mindstick.com/forum/34397/change-date-format-in-gridview  
category: "c#"  
tags: ["asp.net mvc", "mvc", "mvc4", "razor"]  
reading_time: 1 minute  

---

# Change date format in gridview

Hi,

I want to change [format](https://www.mindstick.com/forum/162083/how-to-convert-ost-files-into-pst-format) of datefield in my gridview. Below is my code.

```
 grid.Column("CreationDate", "Creation Date",  item.CreationDate)),
```

Please give me some solution to accomplish my task.

## Replies

### Reply by Hemant Patel

Hi Sara,

I analyzed your code. Please follow below line of code to achieve your task.

```
 grid.Column("CreationDate", "Creation Date", format: (item) => string.Format("{0:dd-MM-yyyy}", item.CreationDate)),
```

Hope its informative......


---

Original Source: https://www.mindstick.com/forum/34397/change-date-format-in-gridview

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
