Oracle TO_YMINTERVAL Function


/ Published in: SQL

A few examples of the TO_YMINTERVAL function.


Copy this code and paste it in your HTML
  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;

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

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.