Skip Headers
Oracle® Objects for OLE Developer's Guide
11g Release 2 (11.2) for Microsoft Windows

E17727-04
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub

CreateOraIntervalYM Method

Applies To

OraSession Object

Description

Creates the OraIntervalYM object. This OraIntervalYM represents an Oracle INTERVAL YEAR TO MONTH data type.

Usage

Set OraIntervalYMObj = OraSession.CreateOraIntervalYM value

Arguments

The arguments for the method are:

Arguments Description
[in] value A Variant of type String, a numeric value, or an OraIntervalYM object.

Return Values

OraIntervalYM Object

Remarks

An OraSession object must be created before an OraIntervalYM object can be created.

If value is a Variant of type String, it must be in the following format: [+/-] YEARS-MONTHS.

If value is a numeric value, the value provided should represent the total number of years that the constructed OraIntervalYM object represents.

A Variant of type OraIntervalYM can also be passed. A cloned OraIntervalYM object is returned.

Examples

Dim oraIYM as OraIntervalYM 
Dim oraIYM2 as OraIntervalYM 
 
'Create an OraIntervalYM using a string which represents 1 year and 2 months 
Set oraIYM = oo4oSession.CreateOraIntervalYM("1- 2") 
 
'Create an OraIntervalYM using a numeric value which represents
'1 year and 6 months 
Set oraIYM = oo4oSession.CreateOraIntervalYM(1.5) 
 
'Create an OraIntervalYM using an OraIntervalYM 
Set oraIYM2 = oo4oSession.CreateOraIntervalYM(oraIYM)