Start of change

TIMESTAMP_FORMAT scalar function can return SQLSTATE '22007' and SQLCODE -20448

In IBM® i 7.2, the TIMESTAMP_FORMAT scalar function has been changed to enforce a failure when the string-expression contains numbers that do not have a corresponding element in the format-string. Prior to this change, the usage was permitted. After this change, the query will fail with SQ20448 and will be preceded by a CPF426B message with reason code: 13 -- The timestamp string can not be interpreted by the format string specified.

Note that TO_DATE and TO_TIMESTAMP are synonyms for TIMESTAMP_FORMAT. To overcome the failure, change the TIMESTAMP_FORMAT usage to have a compatible string-expression and format-string.

End of change