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

Term: YEAR TO MONTH

Definition:
INTERVAL YEAR TO MONTH is an interval literal that stores a period of time using the YEAR and MONTH datetime fields.

An interval literal specifies a period of time, and Oracle supports two types of interval literals: YEAR TO MONTH and DAY_TO_SECOND. You can specify these differences in terms of years and months, or in terms of days, hours, minutes, and seconds. Each type contains a leading field and may contain an optional trailing field.

Note that when specifying a trailing field it must be less significant than the leading field. For example, INTERVAL '0-1' MONTH TO YEAR is not valid. Also note that YEAR TO MONTH performs implicit rounding to nearest value. Since you can't store a partial month in the YEAR TO MONTH interval, it will round the months if you have a partial month.


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