How do I display MM/dd/yyyy (no time) in my DataGridView column?

后端 未结 7 487
臣服心动
臣服心动 2021-01-15 18:41

I need help on my DataGridView column date format. I want the date to be \"MM/dd/yyyy\". I dont need the time.

How can this be done programmatically?

7条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-15 19:14

    for example.

      gridView.DefaultCellStyle.Format = "dd/MM/yyyy";
    

    try this

      gridView.Columns[3].DefaultCellStyle.Format = "dd/MM/yyyy";
    

提交回复
热议问题