• [entity framework ] The conversion of a char data type to a datetime data type resulted in an outofrange datetime value.


    One of the common error people face, when they use Entity Framework, is the exception "The conversion of a datetime2 data type to a datetime data type resulted in an out-of-range value." thrown. This occurs when the entity associated with the table being saved has a mandatory datetime field and you do not set it with some value. The default datetime object is created with a value of 01/01/1000 and will be used in place of null. This will be moved into the datetime field which can hold date value 1753-01-01 00:00:00 and not less than this leads to out-of-range exception. This error can be resolved by either making the datetime field to accept null or by initializing the field with a value.

  • 相关阅读:
    01-数字转人民币读法
    词组缩写
    字符串区间比较
    字符串读入
    回文数判断
    字符串加密
    字母统计
    互质的数
    【Tools】Anaconda Operaction
    【mmwave】DeviceSurvey
  • 原文地址:https://www.cnblogs.com/lushuicongsheng/p/2859926.html
Copyright © 2020-2023  润新知