I have a timestamp that is in the string format that looks like 2010-02-02T07:54:40Z
. How can I get the HOUR
from this timestamp?
I tried SELECT dt, EXTRACT(HOUR FROM dt) FROM table
but I am getting this error:
No matching signature for function EXTRACT for argument types: DATE_TIME_PART FROM STRING. Supported signatures: EXTRACT(DATE_TIME_PART FROM DATE); EXTRACT(DATE_TIME_PART FROM TIMESTAMP [AT TIME ZONE STRING]); EXTRACT(DATE_TIME_PART FROM DATETIME); EXTRACT(DATE_TIME_PART FROM TIME); EXTRACT(DATE_TIME_PART FROM INTERVAL)
How do I get the HOUR
from 2010-02-02T07:54:40Z
?
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.