DateTime for SQL Server 2005, 2008
The minimum value is: 1753-01-01 00:00:00
Maximum value is: 9999-12-31 23:59:59.997
This does not match Datetime.minvalue, DateTime.MaxValue in. NET, and System.Data.SqlTypes.SqlDateTime.MinValue, System.Data.SqlTypes.SqlDateTime.MaxValue matches.
In fact, the. NET and SQL Server field relationships are like this:
System.Data.SqlTypes.SqlDateTime
- Minvalue.value:1753-01-01 00:00:00.000
- maxvalue.value:9999-12-31 23:59:59.997 (note 997)
System.DateTime
- Minvalue:0001-01-01 00:00:00.0000000
- Maxvalue:9999-12-31 23:59:59.9999999
SQL Server 2005, 2008 Fields: smalldatetime
- Minimum value: 1900-01-01 00:00:00
- Maximum value: 2079-06-06 23:59:00 (SQL Server prompt is 2079-06-06 23:59:59, its prompt is incorrect.) )
SQL Server 2005, 2008 Fields: DateTime
- Minimum value: 1753-01-01 00:00:00.000
- Maximum value: 9999-12-31 23:59:59.997 (note 997)
SQL Server 2008 Field: DateTime2
- Minimum value: 0001-01-01 00:00:00.0000000
- Maximum value: 9999-12-31 23:59:59.9999999
Range of datetime values for SQL Server 2005, 2008 (RPM)