Subject String conversion to timestamp fails during insertion in 12 hour format
Author joje
Hello,

I have a table with a column of TIMESTAMP data type.
I could not insert into this column if I use CAST('1/31/2018 08:09:30
PM' AS TIMESTAMP)
on execution of the query it fails.
Later if I change the datetime to 24 hour format conversion is
successful.

CAST('1/31/2018 08:09:30 PM' AS TIMESTAMP) --> insertion fails (SQL
Error code -413)

CAST('1/31/2018 20:09:30' AS TIMESTAMP) --> Successful insertion

Why is it conversion fails in 12 hour format while successful in 24 hour
format?

Do note that my system datetime is 12 hours format.

Thank you.