RPG (IBM i / AS/400) · DB2 SQLCODE

SQLCODE -180 - Invalid Datetime String

What does SQLCODE -180 - Invalid Datetime String mean in RPG (IBM i / AS/400)?

A character string being converted to a DATE, TIME, or TIMESTAMP value - through assignment, CAST, or an implicit host-variable move - isn't in a valid or recognized date/time format.

SQLCODE -180 - Invalid Datetime StringDB2 for i · SQLRPGLE

Condition

A character string being converted to a DATE, TIME, or TIMESTAMP value - through assignment, CAST, or an implicit host-variable move - isn't in a valid or recognized date/time format.

Fix

Validate date/time strings coming from user input or flat files before assigning them to date-typed host variables or columns, and confirm the job's date format attribute matches what the data actually contains.

Related db2 sqlcode