Start of change

-20448   string-expression CANNOT BE INTERPRETED USING FORMAT STRING format-string FOR THE TIMESTAMP_FORMAT FUNCTION.

Explanation

The string expression that was specified for the TIMESTAMP_FORMAT function cannot be interpreted with the specified format string to produce a timestamp value.

function-name
The name of the function. The name used to invoke the function could also be TO_DATE or TO_TIMESTAMP.
string-expression
The string expression.

Possible reasons for this error include:

  • The string expression is too long or too short for the specified format string.
  • The string expression does not conform to the template specified in the format string. For example, 92007 is not a valid value for YYYY, which indicates the year.
  • A value in the string expression is not valid for the corresponding format element in the format string. For example, 45 is not a valid value for DD, which indicates the day of the month.

System action

The statement cannot be processed.

Programmer response

Change the format string argument for the function.

SQLSTATE

22007
End of change