开发者

DateTime Display in Windows Form application

I have a windows form application. I have a query which return me datetime in the format dd-MM-yyyy. But when this datetime is displayed in a datagrid it is displayed as dd/MM/yyyy. I wish to display dd开发者_开发知识库-MM-yyyy in my datagrid. How can this be achieved.


You set this in the column's DefaultCellStyle.Format:

this.dataGridView1.Columns["Date"].DefaultCellStyle.Format = "dd-MM-yyyy";
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜