Oracle® Objects for OLE Developer's Guide 10g Release 1 (10.1) Part Number B10118-01 |
|
Applies To
Description
The OraSession.CreateOraIntervalDS method creates the OraIntervalDS object. This OraIntervalDS represents an Oracle INTERVAL DAY TO SECOND datatype.
Usage
Set OraIntervalDSObj = OraSession.CreateOraIntervalDS value
Arguments
[in] value |
A Variant of type String, a numeric value, an OraIntervalDS, or an OraNumber. |
OraIntervalDS
Remarks
An OraSession object must be created before an OraIntervalDS object can be created.
If value is a Variant of type String, it must be in the following format: Day HH:MI:SSxFF.
If value is a numeric value, the value provided should represent the total number of days that the constructed OraIntervalDS represents.
A Variant of type OraIntervalDS can also be passed. A cloned OraIntervalDS is returned.
Example
Dim oraIDS as OraIntervalDS
Dim oraIDS2 as OraIntervalDS
Dim oraNum as OraNumber
'Create an OraIntervalDS using a string which represents 1 days, 2 hours,
'3 minutes, 4 seconds and 500000 nanoseconds
Set oraIDS = oo4oSession.CreateOraIntervalDS("1 2:3:4.005")
'Create an OraIntervalDS using a numeric value which represents
'1 days and 12 hours
Set oraIDS = oo4oSession.CreateOraIntervalDS(1.5)
'Create an OraIntervalDS using an OraIntervalDS
Set oraIDS2 = oo4oSession.CreateOraIntervalDS(oraIDS)