select to_timestamp(to_char(systimestamp + INTERVAL '-1' DAY, 'dd-mon-yy hh.mi.ss.ff4 AM')) from dual; ------ -1 day
select to_timestamp(to_char(systimestamp + INTERVAL '-2' HOUR, 'dd-mon-yy hh.mi.ss.ff4 AM')) from dual; ----- -2 hours current date time
select to_timestamp(to_char(systimestamp + INTERVAL '-1' DAY, 'dd-mon-yy hh.mi.ss.ff4 AM')) + INTERVAL '-2' HOUR from dual; ------- -2 hours -1 day
No comments:
Post a Comment