How to subtract hours from a date in Oracle so it affects the day also

前端 未结 5 1969
暗喜
暗喜 2021-02-01 17:23

I\'m trying to subtract date from Oracle so it even effect the day as well. For example, if the timestamp is 01/June/2015 00 hours and if I subtract 2 hours, I want to be able

5条回答
  •  醉话见心
    2021-02-01 18:09

    you should divide hours by 24 not 11
    like this:
    select to_char(sysdate - 2/24, 'dd-mon-yyyy HH24') from dual

提交回复
热议问题