In the process of debugging some stored procedures the other day a colleague and I happened on an input parameter that had been given the type smalldatetime. We noticed it because we were using the maximum and minimum values for System.DateTime to set boundaries in some validation code. The maximum value for the System.DateTime structure is a number of ticks equivalent to the date December 31, 9999. That’s sufficient to cover the expected remainder of Robert Byrd’s time in the Senate.
A datetime SQL type has the same upper bound. However, a smalldatetime is only good through June 6, 2079. That’s why our validation code caused errors in the database. I admit it’s been many moons since I used a smalldatetime, and I was surprised to see that they expire so “soon” in relative terms. So if, seven decades from now, you’re around and hearing about the Y2.079K crisis and how it will cause flying cars to fall from the sky, bullet trains to collide at 350 KPH, and Senator Byrd to miscalculate his next earmark, remember that you read it here first. Probably.