http://blog.csdn.net/jiwenyi163/article/details/2973100
The. Net Framework and SQL Server 2005 chaotic time maximum minimum
Before I talked to Dotjum. Microsoft had a very inconsistent minimum maximum time for DateTime and SQL Server 2005, and did not expect anyone to have touched the same trap.
References:
C # Datetime.minvalue is isn't the same as Sqldatetime.minvalue Caution when passing Null or DateTime into Store Procedure
And that's actually one of the things I've been talking to a lot of people about: procured our material, the IT technology problems we meet are most unlikely to be met for the first time in the world. In other words, for the most part, we have encountered an IT technology problem that someone in this world must have met and already resolved! In simple words, use the keyword search to solve the problem.
Net Framewrok,
Datetime.minvalue = 0001/01/01 00:00:00
SqlDateTime.MinValue.Value = 1753/01/01 00:00:00
In SQL Server 2005,
DateTime Minimum value = 1753/01/01 00:00:00
smalldatetime minimum value = 1900/01/01 00:00:00
Net Framewrok,
DateTime.MaxValue
SqlDateTime.MaxValue.Value = 9999/12/31 23:59:59.997
In SQL Server 2005,
DateTime max = 9999/12/31 23:59:59.997
smalldatetime Maximum Value
Alas! Isn't it a bit confusing? A little careless, there may be Overflow problems that will produce
The. Net Framework and SQL Server 2005 chaotic time maximum minimum