Posted By

bbrumm on 02/23/17


Tagged

sql Oracle


Versions (?)

Oracle TO_YMINTERVAL Function


 / Published in: SQL
 

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

A few examples of the TO_YMINTERVAL function.

  1. --TO_DSINTERVAL
  2.  
  3. --Example 1
  4. SELECT TO_YMINTERVAL('02-05') AS INTERVAL_TEST
  5. FROM dual;
  6.  
  7.  
  8. --Example 2
  9. SELECT TO_YMINTERVAL('15-06') AS INTERVAL_TEST
  10. FROM dual;
  11.  
  12.  
  13. --Example 3
  14. SELECT SYSDATE, SYSDATE + TO_YMINTERVAL('4-01') AS INTERVAL_TEST
  15. FROM dual;
  16.  
  17. --Example 4
  18. SELECT TO_YMINTERVAL('P1Y2M') AS INTERVAL_TEST
  19. FROM dual;

Report this snippet  

You need to login to post a comment.