Creates a new OraTimeStampTZ object. This OraTimeStampTZ object represents an Oracle TIMESTAMP WITH TIME ZONE data type.
The arguments for the method are:
| Arguments | Description | 
|---|---|
| [ in]value | A Variantof typeString,Date, orOraTimeStampTZ. | 
| [[ in] [optional]format | TIMESTAMPWITHTIMEZONEformat string to be used when displaying or interpreting anOraTimeStampTZobject as a string. If format is not specified, theTIMESTAMPWITHTIMEZONEstring is interpreted using the sessionTIMESTAMPWITHTIMEZONEformat (NLS_TIMESTAMP_TZ_FORMATformat). | 
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.
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) 
See Also: