Date Functions: Numtodsinterval

Description: Converts a number to an INTERVAL DAY TO SECOND literal.

NUMTODSINTERVAL(n, <interval_unit>)
 
SELECT NUMTODSINTERVAL(120, 'DAY') FROM dual;
 
SELECT NUMTODSINTERVAL(1200, 'HOUR') FROM dual;
 
SELECT NUMTODSINTERVAL(12000, 'MINUTE') FROM dual;
 
SELECT NUMTODSINTERVAL(120000, 'SECOND') FROM dual;

Enjoyed this post? Share it!

 

Leave a comment

Your email address will not be published.