Quick Search:
CODE
Oracle PL/SQL Code Library
JOBS
Find Or Post Oracle Jobs
FORUM
Oracle Discussion & Chat
 Thw Oracle NUMTOYMINTERVAL Function      [Return To Index] Jump to:  
  Looking for the original pages? (formerly called "Morgan's Library") You can find them here.

Term: NUMTOYMINTERVAL

Definition:
The Oracle PL/SQL NUMTOYMINTERVAL function converts an input number to its specified Interval Year to Month Unit equivalent. The allowed interval units can be YEAR or MONTH. The return type of the function is INTERVAL.

Example Syntax

NUMTOYMINTERVAL(n, interval unit)


Note that the Interval unit specification is case insensitive.

Example Usage

The SQL queries below converts 1 to possible Year to Month Interval units.

SQL> SELECT NUMTOYMINTERVAL(1,'YEAR') FROM DUAL;

NUMTOYMINTERVAL(1,'YEAR')
---------------------------------
+000000001-00

SQL> SELECT NUMTOYMINTERVAL(1,'MONTH') FROM DUAL;

NUMTOYMINTERVAL(1,'MONTH')
----------------------------------
+000000000-01



Related Links:

Related Code Snippets:
 
Home      :      Code Library      :      Sponsors      :      Privacy      :      Terms of Use      :      Contact Us 268 users online    © 2009 psoug.org
PSOUG LOGIN
Username: 
Password: 
Forgot your password?