Search This Blog

Total Pageviews

Monday 14 February 2011

Oracle Date Time - How to add second Minute hour

Example using NUMTODSINTERVAL with SYSDATE:



Example-- Add 20 second in system time

select to_char(sysdate,'dd/mm/yyyy hh:mi:ss'),to_char (SYSDATE + NUMTODSINTERVAL(20,'SECOND'),'dd/mm/yyyy hh:mi:ss') from dual;


One of the string constants: 'DAY', 'HOUR', 'MINUTE', or 'SECOND'.

No comments:

Oracle DBA

anuj blog Archive