Oracle NUMTOYMINTERVAL Function


/ Published in: SQL
Save to your folder(s)

A few examples of the NUMTOYMINTERVAL function.


Copy this code and paste it in your HTML
  1. --NUMTOYMINTERVAL
  2.  
  3.  
  4. --Example 1
  5. SELECT NUMTOYMINTERVAL(15, 'YEAR') AS YMTEST
  6. FROM dual;
  7.  
  8.  
  9. --Example 2
  10. SELECT NUMTOYMINTERVAL(23, 'MONTH') AS YMTEST
  11. FROM dual;
  12.  
  13.  
  14. --Example 3
  15. SELECT NUMTOYMINTERVAL(-4, 'YEAR') AS YMTEST
  16. FROM dual;
  17.  
  18.  
  19. --Example 4
  20. SELECT NUMTOYMINTERVAL(-18, 'MONTH') AS YMTEST
  21. FROM dual;

URL: http://www.databasestar.com/oracle-numtoyminterval/

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.