J. *_*der 2 sql database time casting amazon-redshift
我正在尝试将时间戳列转换或转换为Redshift数据库中的整数值。我知道在其他基于SQL的数据库中也是可能的,而我之前已经做过,但是在Redshift中我无法使其正常工作。
我还尝试了cast和的一些变体convert(http://docs.aws.amazon.com/redshift/latest/dg/r_CAST_function.html)。
这是一个例子:
SELECT cast(finish_time as integer) FROM table;
它给我错误信息:
SQL Error Invalid operation: cannot cast type timestamp without time zone to integer;
是否可以将时间戳记作为整数?
| 归档时间: |
|
| 查看次数: |
3061 次 |
| 最近记录: |