问题描述
创建的列,修改的类型为时间戳,不带时区
以毫秒为单位在此列中获取增量:
select extract(milliseconds from modified_at - created_at) as delta_millsfrom shop_order
好。现在,我想获取当前日期的增量和列 created_at
我尝试这个:
select id,extract(milliseconds from (EXTRACT(EPOCH FROM current_timestamp) * 1000) - created_at) as detla_mills from shop_order
但是会出错
:
ERROR: operator does not exist: double precision - timestamp without time zone
LINE 1: ...om (EXTRACT(EPOCH FROM current_timestamp) * 1000) - created_...
^
HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts.
SQL state: 42883
Character: 85
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)