日期:2014-05-18 浏览次数:20896 次
dataGridView.Columns[1].DefaultCellStyle.Format = "HH:mm"; dataGridView.Rows.Add(new object[] { 2, DateTime.Now, 3 }); dataGridView.Rows.Add(new object[] { 5, DateTime.Now, 6 }); dataGridView.Rows.Add(new object[] { 8, DateTime.Now, 9 });
------解决方案--------------------
Formating the Date To Format as dd/MM/yyyy is this.dgView.Columns["Inv/Ch Date"].DefaultCellStyle.Format = "dd/MM/yyyy"; To Format as dd/MMM/yyyy is this.dgView.Columns["Inv/Ch Date"].DefaultCellStyle.Format = "dd/MMM/yyyy"; To Format as dd-MMM-yyyy is this.dgView.Columns["Inv/Ch Date"].DefaultCellStyle.Format = "dd-MMM-yyyy";