Format TimeSpan in DataGridView column

前端 未结 5 1521
梦毁少年i
梦毁少年i 2020-12-16 22:27

I\'ve seen these questions but both involve methods that aren\'t available in the CellStyle Format value. I only want to show the hours and minutes portion (16:05); not the

5条回答
  •  生来不讨喜
    2020-12-16 23:09

    Use format string "hh\\:mm". e.g

    YourGrid.Column[index].DefaultCellStyle.Format = "hh\\:mm"
    

提交回复
热议问题