Only dates between January 1, 1753 and December 31, 9999 are accepted

Symptoms

The following error can occur when inserting data with the datetime data type into a MS SQL 2008 database:

Exception in component tMSSqlOutput_1
java.sql.SQLException: Only dates between January 1, 1753 and December 31, 9999 are accepted.
at net.sourceforge.jtds.jdbc.DateTime.packDate(DateTime.java:318)
at net.sourceforge.jtds.jdbc.DateTime.<init>(DateTime.java:126)

Generally, this error appears because the inserted date is either zero (such as "0000-00-00 00:00:00") or less than January 1, 1753.

Procedure

The MS SQL Server driver specification says that MS SQL Server cannot handle a zero date or any dates prior to January 1, 1753. You should handle these dates in another way. You can either set them to NULL in MS SQL Server, or set them to minimum value allowed (January 1, 1753). For example, the following images show how to set all dates prior to January 1st, 1970 to NULL with a tMap component: