0

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"

1 Answer 1

1

Try this:

select PARSE_TIMESTAMP("%Y-%m-%dT%H:%M:%E*S", "2021-05-11T02:00:03.4897671")
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.