Replacing a DateTime.MinValue in a DataGridView

后端 未结 8 1623
悲哀的现实
悲哀的现实 2021-01-17 22:42

I am working on a name record application and the information is stored in a SQLite database. All columns in the database are TEXT types, except for the date of birth column

8条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-17 23:40

    You just need to cast it to DateTime

    if ((DateTime)(resultsGrid.CurrentRow.Cells["DateOfBirth"].Value) == DateTime.MinValue)
                {
                     // Set cell value to ""
                }
    

提交回复
热议问题