I am trying to convert a timestamp string to timestamp with date_parse, but keep getting an error. Any suggestions? I am working on Presto SQL. I have tried to replace %H:%f
with %T
and it still doesn't work.
date_parse(sg."@timestamp", '%Y-%m-%d %H:%f')
The error message is:
presto: query failed (200 OK): "USER_ERROR: com.facebook.presto.spi.PrestoException: Invalid format: "2017-12-31 08:29:02.12" is malformed at ":02.12""
Any help would be greatly appreciated, thanks!