The timestamps my database returns are in this format:
'2022-11-25T17:54:29.819Z'
I want to do hour(timestamp) to return just the hour but get this error
'error:"function hour(timestamp with time zone) does not exist"'
How do I get around this? Thanks!
2
Answers
Try the function
extract(...)
:We can use
EXTRACT
for that:Whether a Z occurs in the timestamp, doesn’t matter, see db<>fiddle
See the documentation