First, DateTime
data types can only store a minimum date of '1753-01-01'. For SmallDateTime
, the minimum date is '1900-01-01'. It is not an accident that they chose this value. The calendar itself changed in 1752 and thus trying to compare the number of days from say '1701-01-01' to now is problematic using standard date math.
However, in SQL Server 2008, there a new DateTime2
or Date
either of which can store a value of 0001-01-01
but it would be mistake to do so for the reason I just mentioned.
Third, trying to use an arbitrary date to represent the absence of a date value is a mistake IMO. This is what I call the "magic value" approach to avoiding nulls. IMO, it greatly complicates the calling code as the calling code now has to know about and check for the magic value instead of a null to know whether to display a blank. Instead, you should return nullable DateTime values (DateTime?
) from your LINQ code and pass that null all the way to the presentation tier so that the presentation code can deal with absent values.or