ITPub博客

首页 > 数字化转型 > ERP > timestamp类型的加减运算

timestamp类型的加减运算

原创 ERP 作者:wenzai169 时间:2012-01-04 14:29:51 0 删除 编辑

SELECT to_char(fapplytime + NUMTODSINTERVAL(3,'day'),'yyyy-mm-dd HH24:mi:ss:ff6'), fapplytime FROM tdeposit where id=376169319;

 对numtodesignterval的原版诠释如下:
  NUMTODSINTERVAL converts n to an INTERVAL DAY TO SECOND literal. The argument n can be any NUMBER value or an expression that can be implicitly converted to a NUMBER value. The argument interval_unit can be of CHAR, VARCHAR2, NCHAR, or NVARCHAR2 datatype. The value for interval_unit specifies the unit of n and must resolve to one of the following string values:
  ’DAY’
  ’HOUR’
  ’MINUTE’
  ’SECOND’

[@more@]

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/181228/viewspace-1057031/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
  • 博文量
    20
  • 访问量
    42804