【发布时间】:2016-10-06 17:08:08
【问题描述】:
我需要在 Redshift/Postgres 中从字符日期(例如下午 3:30 到 15:30:00)中提取一天中的时间。所以,我需要从下午 3:30 到 15:30 到 15 点。
有人指点吗?谢谢
【问题讨论】:
-
extract(hour from cast(timeedt as time)) 如前所述,我也尝试过转换。 SQL 弹出错误或: INFO: Function ""date_part"(text,time without time zone)" not supported。信息:不支持函数“时间”(文本)”。错误:Redshift 表不支持指定的类型或函数(每条 INFO 消息一个)。 SQL状态:0A000
标签: sql postgresql amazon-redshift