| Oracle® Objects for OLE Developer's Guide 11g Release 2 (11.2) for Microsoft Windows Part Number E17727-03 | 
 | 
| 
 | PDF · Mobi · ePub | 
Creates a new OraTimeStamp object. This OraTimeStamp method represents an Oracle TIMESTAMP or an Oracle TIMESTAMP WITH LOCAL TIME ZONE data type.
Set OraTimeStampObj = OraSession.CreateOraTimeStamp value format
The arguments for the method are:
| Arguments | Description | 
|---|---|
| [ in]value | A Variantof typeString,Date, orOraTimeStamp. | 
| [ in] [optional]format | TimeStampformat string to be used when displaying or interpreting anOraTimeStampobject as a string. If format is not specified, theTimeStampstring is interpreted using the sessionTIMESTAMPformat (NLS_TIMESTAMP_FORMATformat). | 
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 Format property of the OraTimeStamp ; otherwise, the session TIMESTAMP format is stored in the OraTimeStamp Format property.
Dim oraTS as OraTimeStamp 
Dim oraTS1 as OraTimeStamp 
Dim date as Date 
 
'Create an OraTimeStamp using a string assuming the session  
'TIMESTAMP format is "DD-MON-RR HH.MI.SSXFF AM" 
Set oraTS = oo4oSession.CreateOraTimeStamp("12-JAN-2003 12.0.0.0 PM") 
 
'Create an OraTimeStamp using a string and a format 
Set oraTS = oo4oSession.CreateOraTimeStamp("2003-01-12 12:00:00 PM", _ 
         "YYYY-MM-DD HH:MI:SS AM") 
 
'Create an OraTimeStamp using a Date 
date = #1/12/2003# 
 
Set oraTS = oo4oSession.CreateOraTimeStamp(date) 
 
'Create an OraTimeStamp  using an OraTimeStamp 
Set oraTS1 = oo4oSession.CreateOraTimeStamp(oraTS) 
See Also: