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

CreateOraTimeStampTZ Method

Applies To

OraSession Object

Description

Creates a new OraTimeStampTZ object. This OraTimeStampTZ object represents an Oracle TIMESTAMP WITH TIME ZONE data type.

Usage

Set OraTimeStampTZObj = OraSession.CreateOraTimeStampTZ value format

Arguments

The arguments for the method are:

Arguments Description
[in] value A Variant of type String, Date, or OraTimeStampTZ.
[[in] [optional] format TIMESTAMP WITH TIME ZONE format string to be used when displaying or interpreting an OraTimeStampTZ object as a string. If format is not specified, the TIMESTAMP WITH TIME ZONE string is interpreted using the session TIMESTAMP WITH TIME ZONE format (NLS_TIMESTAMP_TZ_FORMAT format).

Return Values

OraTimeStampTZ Object

Remarks

An OraSession object must be created before an OraTimeStampTZ 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 specified; otherwise, the string format must match the session TIMESTAMP WITH TIME ZONE format (NLS_TIMESTAMP_TZ_FORMAT).

If value is a Variant of type Date, the date-time value in the Date is interpreted as the date-time value in the time zone of the session. The TimeZone property in the OraTimeStampTZ object contains the time zone of the session.

If format is specified, it is stored in the Format property of the OraTimeStampTZ object, otherwise the session TIMESTAMP WITH TIME ZONE format is stored in the Format property of OraTimeStampTZ object.

Examples

Dim oraTSZ as OraTimeStampTZ 
Dim oraTSZ1 as OraTimeStampTZ 
Dim date as Date 
 
'Create an OraTimeStampTZ using a string assuming the session 
'TIMESTAMP WITH TIME ZONE format is "DD-MON-RR HH.MI.SSXFF AM TZH:TZM"
Set oraTSZ = oo4oSession.CreateOraTimeStampTZ( "12-JAN-2003" & _
             "12.0.0.0 PM -03:00") 
 
'Create an OraTimeStampTZ using a string and a format 
Set oraTSZ = oo4oSession.CreateOraTimeStampTZ( "2003-01-12" & _
             "12:00:00 PM -03:00", "YYYY-MM-DD HH:MI:SS AM TZH:TZM") 
 
'Create an OraTimeStampTZ using a Date 
date = #1/12/2003# 
Set oraTSZ = oo4oSession.CreateOraTimeStampTZ(date) 
 
'Create an OraTimeStampTZ  using an OraTimeStampTZ 
Set oraTSZ1 = oo4oSession.CreateOraTimeStampTZ(oraTSZ)