To add / subtract from DATE , you have 2 options:
Method # 1: The easiest way is to use + and - to add / subtract days, hours, minutes, seconds, etc. From the DATE function, and ADD_MONTHS() to add / subtract months and years from DATE . Why? This is because from days you can get hours and any smaller unit (1 hour = 1/24 days), (1 minute = 1/1440 days), etc. But you cannot get months and years, since it depends on the months and years themselves, therefore, ADD_MONTHS() and no add_years (), because months can be used to get years (1 year = 12 months).
Let's try them:
SELECT TO_CHAR(SYSDATE, 'DD-MON-YYYY HH24:MI:SS') FROM dual;
Method # 2: Using INTERVAL s, you can easily subtract the interval (duration) from the date. Moreover, you can combine the addition or subtraction of several units at the same time (for example, 5 hours and 6 minutes, etc.) Examples:
SELECT TO_CHAR(SYSDATE, 'DD-MON-YYYY HH24:MI:SS') FROM dual;
source share