Error - SqlDateTime overflow. Must be between 1/1/1753 12:00:00 AM and 12/31/9999 11:59:59 PM
I find using the following works quite well for SQL min/max dates after many DB related errors:
DateTime rngMin = (DateTime)System.Data.SqlTypes.SqlDateTime.MinValue; DateTime rngMax = (DateTime)System.Data.SqlTypes.SqlDateTime.MaxValue;
🐳 作者:dupeng0811 📢 版权:本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接 💬 留言:同时 , 如果文中有什么错误,欢迎指出。以免更多的人被误导。 |