xvzf
xvzf

Reputation: 197

Why is this timestamp invalid?

I want to extract the Date part from this timestamp 2022-05-25T061538.576403Z. However, I keep getting invalid timestamp error with both the EXTRACT() and the DATE() functions. Will appreciate if some insights is available on why is it invalid along with the extract part.

Upvotes: 0

Views: 4635

Answers (1)

Prajna Rai T
Prajna Rai T

Reputation: 1810

As mentioned by @Jaytiger, The issue can be resolved by using below query to extract the Date part from the Timestamp value 2022-05-25T061538.576403Z.

DATE(LEFT('2022-05-25T061538.576403Z', 10));

Upvotes: 1

Related Questions