Informix Error -1210: Date could not be converted to month/day/year format.
Cause and resolution
Date could not be converted to month/day/year format.
The DATE type is compatible with the INTEGER type, but not all integer values are valid dates. This error arises in attempts to convert to character from a date whose numeric value is less than -693,594 or greater than 2,958,464. Numbers that are outside this range have no representation as dates.
You may also see this message if you try to use the VARIANCE() or STDEV() functions on an inappropriate data type, such as DATE.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-1210 fires when a DATE internal integer value can't be converted to character month/day/year
format — per the official guidance, the internal value must fall between -693,594 and
2,958,464 to represent a valid date; values outside this range can't be converted. The same
message can also appear when a statistical function like VARIANCE() or STDEV() is applied to
an incompatible type such as DATE.
- A
DATEinternal value outside the-693,594to2,958,464range, per the official guidance — the direct, named cause, typically from date arithmetic that pushed a value far out of bounds. VARIANCE()/STDEV()(or a similar statistical function) applied to aDATEcolumn, per the official guidance's other named case — an incompatible-type usage rather than an out-of-range value.
Solutions / Resolution
- Check the date arithmetic that produced the out-of-range internal value, per the official guidance, if that's the actual cause.
- Don't apply
VARIANCE()/STDEV()(or similar) directly to aDATEcolumn, per the official guidance's other named case — convert to a numeric representation first if a statistical measure is genuinely needed.
Examples
Date arithmetic pushing far out of range
SELECT order_date + 10000000 FROM orders WHERE order_id = 1;
-- -1210: the resulting internal date value exceeds 2,958,464
Diagnostic Checks
- Check whether a statistical function is being applied directly to a
DATEcolumn, per the official guidance's specific case. - If not, check the date arithmetic involved for a result far outside the valid internal range.
Related Errors / Related Topics
No closely related error codes are cross-referenced for -1210 in this set yet.
Either a DATE internal value out of the -693,594..2,958,464 range, or a statistical
function applied directly to a DATE column — check the arithmetic or the function usage.