Informix Error -1275
-1275 Invalid field width or precision in datetime or interval format string.
The field width or precision in DATETIME or INTERVAL format specification must make sense. The field width must be a decimal number, with a leading zero or minus ( - ) sign. If a precision specification is present, it must also be decimal, separated from the field-width specification by a period.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-1275 fires when a DATETIME/INTERVAL format string's field width or precision doesn't
follow the required syntax — per the official guidance, the field width must be a decimal
number (optionally with a leading zero or minus sign), and if a precision is present, it must
also be decimal and separated from the field width by a period.
- A non-decimal field width, per the official guidance — the direct, common cause.
- A precision specification not separated from the field width by a period, per the official guidance — a punctuation/syntax error.
- A non-decimal precision value, per the official guidance's other named requirement.
Solutions / Resolution
- Ensure the field width is a decimal number, per the official guidance, with an optional leading zero or minus sign.
- Ensure any precision specification is decimal and separated from the field width by a period, per the official guidance.
Examples
A malformed field-width/precision specification
rfmtdate(date_val, "%-x.3f", out_buf);
-- -1275: 'x' isn't a valid decimal field width
Diagnostic Checks
- Check the format string's field-width and precision syntax against the documented rules (decimal field width, period-separated decimal precision).
Related Errors / Related Topics
- -1276 — "Format conversion character not supported." A related format-string error, about the conversion character itself rather than field width/precision syntax.
The format string's field width or precision doesn't follow the required decimal syntax — check it against the documented rules.