Matt is most likely on the right track. You have defined a default value for your column, however this will only take effect if you really insert something into your table in the database.
When you do a unit test, as you say, you most likely initialize the DateTime variable with something (or not), then it will be DateTime.MinValue, which is 01/01/0001), and then you submit to SQL Server, and this value is out of range for DATETIME on SQL Server (as the error clearly indicates).
So, you need to add a line to your .NET unit test to initialize the DateTime variable to "DateTime.Today":
DateTime myDateTime = DateTime.Today
and then paste this into SQL Server.
OR: you can modify the SQL INSERT statement so that it does not insert a value for this column - it looks right now, it does it (and tries to insert it - for SQL Server - the date is incorrect in the table). If you do not specify this column in your INSERT, then the default column getdate() will start and insert today's date into the column.
Mark
source share