'Presto Value cannot be cast as TIMESTAMP

I'm getting the error, value cannot be cast as timestamp: 2021-03-14 02:21:16. This seems like a perfectly eligible candidate for a timestamp cast. Is there any reason why this error should be triggered?

I'm tempted to just use TRY_CAST and filter out the NULL values in a WHERE clause. But I'm not sure how prevalent this issue is and would like to better understand what's causing it. The type of the value in the db table is VARCHAR.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source