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

Part Number E17727-03
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
OOFOL434

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.

Usage

OraTimeStampObj.AddIntervalDS operand
OraTimeStampTZObj.AddIntervalDS operand

Arguments

The arguments for the method are:

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

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 object 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 
 
... 
Reader Comment

   

Comments, corrections, and suggestions are forwarded to authors every week. By submitting, you confirm you agree to the terms and conditions. Use the OTN forums for product questions. For support or consulting, file a service request through My Oracle Support.

Hide Navigation

Quick Lookup

Database Library · Master Index · Master Glossary · Book List · Data Dictionary · SQL Keywords · Initialization Parameters · Advanced Search · Error Messages

Main Categories

This Document

New and changed documents:
RSS Feed HTML RSS Feed PDF