Skip Headers

Oracle® Objects for OLE Developer's Guide
10g Release 1 (10.1)

Part Number B10118-01
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Master Index
Master Index
Go to Feedback page
Feedback

AddIntervalDS Method

Applies To

OraTimeStamp Object

OraTimeStampTZ Object

Description

Adds an interval that represents an interval from days to seconds, to the OraTimeStamp or OraTimeStampTZ object.

Arguments

[in] operand
A Variant of type String, a numeric value, or an OraIntervalDS that represents an interval from days to seconds, to be added to the current OraTimeStamp or OraTimeStampTZ object.
Usage

OraTimeStampObj.AddIntervalDS operand

OraTimeStampTZObj.AddIntervalDS operand

Remarks

The result of adding an interval to the current OraTimeStamp or OraTimeStampTZ object is stored in the current object, overwriting any previous value. There is no return value.

If operand is a Variant of type String, it must be in the following format: [+/-]Day HH:MI:SSxFF.

If operand is a numeric value, the value provided should represent the total number of days that the constructed OraIntervalDS represents.

Examples

Using OraTimeStamp

Dim OraTimeStamp As OraTimeStamp

...

'Create OraTimeStamp using a string

Set OraTimeStamp = OraSession.CreateOraTimeStamp("2000-12-28

    00:00:00", "YYYY-MM-DD HH:MI:SS")

'Add an interval using numeric value that represents 5 days and 12 hours

OraTimeStamp.AddIntervalDS 5.5

'Value should now be "2001-1-2 12:00:00"

tsStr = OraTimeStamp.Value

Using OraTimeStampTZ

Dim OraTimeStampTZ As OraTimeStampTZ

...

'Create OraTimeStampTZ using a string

Set OraTimeStamp = OraSession.CreateOraTimeStampTZ("2000-12-28

    00:00:00 -07:00", "YYYY-MM-DD HH:MI:SS TZH:TZM")

'Add an interval using numeric value that represents 5 days and 12 hours

OraTimeStampTZ.AddIntervalDS 5.5

'Value should now be "2001-1-2 12:00:00"

tstzStr = OraTimeStampTZ.Value

...