Reputation: 455
I have a string '2017/05/16 19:33:49'
and I'm getting an error when I try to convert it to the TIMESTAMP
:
Error: Invalid timestamp: '2017/05/16 19:33:49'
I want to use CAST
function to convert it to TIMESTAMP
. How can I do it?
Upvotes: 0
Views: 4544
Reputation: 208042
SELECT PARSE_TIMESTAMP("%Y/%m/%d %H:%M:%S", "2017/05/16 19:33:49") as parsed;
Upvotes: 5