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

CreateOraTimeStamp Method

See Also

Applies To

OraSession Object

Description

The OraSession.CreateOraTimestamp method creates a new OraTimeStamp object. This OraTimeStamp represents an Oracle TIMESTAMP or an Oracle TIMESTAMP WITH LOCAL TIME ZONE datatype.

Usage

Set OraTimeStampObj = OraSession.CreateOraTimeStamp value format

Arguments
Description
[in] value
A Variant of type String, Date, or OraTimeStamp.
[in, optional] format
TimeStamp format string to be used when displaying or interpreting an OraTimeStamp as a string. If format is not specified, the TimeStamp string is interpreted using the session TIMESTAMP format (NLS_TIMESTAMP_FORMAT format).
Return Values

OraTimeStamp

Remarks

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

If value   is a Variant of type String, the string format must match the datetime format specified in the format  argument. If format  is not specified, the string format must match the session TIMESTAMP format (NLS_TIMESTAMP_FORMAT).

If format  is specified, it is stored in the OraTimeStamp's Format property; otherwise the session TIMESTAMP format is stored in the OraTimeStamp's Format property.

Example

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)