Start of change

-20497   A STRING REPRESENTATION OF A DATETIME VALUE THAT CONTAINS A TIME ZONE CANNOT BE IMPLICITLY OR EXPLICITLY CAST TO A TARGET DEFINED AS DATETIME WITHOUT TIME ZONE

Explanation

The statement attempted to cast a string representation of a datetime value that contains a time zone to a datetime target that is defined to not have a time zone. This action is not supported.

System action

The statement cannot be processed.

User response

Change the application to first cast the string value with a time zone to a datetime value with a time zone, and then cast the result to a datetime value without a time zone. Then make the assignment to the target.

SQLSTATE

22007

End of change