Itz.Irshad
Itz.Irshad

Reputation: 1024

Changing Date Format in C#

How to change the format of date in DataGridView cell in WinForm Application? The source format of that cell is "YYYY-MM-DD" and I want to change it as "DD/MM/YYYY". How can I accomplish this ?

Upvotes: 0

Views: 835

Answers (1)

Dan Teesdale
Dan Teesdale

Reputation: 1863

By changing the default cell style.

this.DataGridView1.Columns[0].DefaultCellStyle.Format = "dd/MM/yyyy"

http://msdn.microsoft.com/en-us/library/f9x2790s.aspx

Upvotes: 3

Related Questions