An invalid date (e.g., a pre-1700 date) is reported as CTDB_INVDATE. A configuration option, SQL_OPTION BADDATES_ASNULL, allows date fields that would normally return an error due to an out-of-range date to be returned to SQL as NULL.
The following criteria will return every bad date, and dates that are null, for the table containing the mydate column:
WHERE mydate > '12/31/9999' OR mydate IS NULL
Warning This option is only recommended when initially analyzing "dirty" data in tables, for example, linked legacy data. Using this option can mask actual invalid data that should be corrected.
SQL_OPTION BADTIMES_ASNULL (SQL_OPTION BADTIMES_ASNULL, SQL_OPTION BADTIMES_ASNULL )