Reputation: 512
Whats the best way to convert a string value like this to a timestamp?
"2021-05-11T02:00:03.4897671"
I tried the below
select PARSE_TIMESTAMP("%Y-%m-%d %H:%M:%E#S", "2021-05-11T02:00:03.4897671")
But I get the following error
Failed to parse input string "2021-05-11T02:00:03.4897671"
Upvotes: 0
Views: 182
Reputation: 10172
Try this:
select PARSE_TIMESTAMP("%Y-%m-%dT%H:%M:%E*S", "2021-05-11T02:00:03.4897671")
Upvotes: 1