Unable to convert MySQL date/time value to System.DateTime

后端 未结 9 884
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-08 22:04

I am using ibatis and C#. i get a result from a select query that has CreatedDate as one of the field. The Datatype of CreatedDate in Mysql is Date. I assign the result set

9条回答
  •  被撕碎了的回忆
    2020-12-08 22:45

    This issue happened to me when a date column in my table had been set to 0 rather than null - there was a bug in my code that.

    Looking at the table I could see that the field had been set to a date of 000-00-00 - once I had reset the offending field to null the issue went away.

提交回复
热议问题