Replacing a DateTime.MinValue in a DataGridView

后端 未结 8 1607
悲哀的现实
悲哀的现实 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条回答
  •  借酒劲吻你
    2021-01-17 23:39

    I discovered why the DateTime.MinValue was displaying!

    This line in the cell formatting section caused the MinValue of "01/01/0001" to display:

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

    Without this line, the Date of Birth field in my datagridview is left blank.

    Barbaros Alp is still correct about what I was trying to do at the time. Thanks everyone!

提交回复
热议问题