【发布时间】:2022-12-03 05:35:31
【问题描述】:
我的数据库返回的时间戳采用这种格式:
'2022-11-25T17:54:29.819Z'
我想做 hour(timestamp) 只返回小时但是得到这个错误
'error:"function hour(timestamp with time zone) does not exist"'
我该如何解决这个问题?谢谢!
【问题讨论】:
标签: sql postgresql
我的数据库返回的时间戳采用这种格式:
'2022-11-25T17:54:29.819Z'
我想做 hour(timestamp) 只返回小时但是得到这个错误
'error:"function hour(timestamp with time zone) does not exist"'
我该如何解决这个问题?谢谢!
【问题讨论】:
标签: sql postgresql
尝试功能extract(...):
select extract(hour from my_column) from my_table
【讨论】:
【讨论】: