解决The conversion of a datetime2 data type to a datetime data type resulted in an out-of-range value
问题描述在平时使用代码操作SQL Server数据库时,会遇到给日期格式的字段赋值,然后插入或者更新到数据库中等。平时使用的日期都是比较靠近现在的时间,所以一般不会遇到问题。但是有时候,比如在C#中的DateTime类中DateTime.MinValue 1/1/0001 12:00:00 AM 最小值是DateTime的默认值DateTime.MaxValue 12/31/999...
原创
2019-04-01 14:52:55 ·
7550 阅读 ·
0 评论