DB2®DataReader.GetDateTimeOffset Method
Gets the value of the specified column as a DateTimeOffset object.
- Namespace:
IBM.Data.DB2
- Assembly:
IBM.Data.DB2
(inIBM.Data.DB2.dll
)
Syntax
[Visual Basic]
Public Function GetDateTimeOffset( _
ByVal i As Integer _
) As DateTimeOffset
[C#]
public DateTimeOffset GetDateTimeOffset(
int i
);
[C++]
public: DateTimeOffset GetDateTimeOffset(
int i
);
[JScript]
public function GetDateTimeOffset(
i : int
) : DateTimeOffset;
Parameters
- i
- The zero-based column ordinal.
Return value
The value of the specified column as a DateTimeOffset object.
Exceptions
Exception type | Condition |
---|---|
InvalidCastException | The specified cast is not valid. |
DB2Exception | Invalid conversion. |
Remarks
No conversions are performed. The data to be retrieved must be of DB2Type.TimeStampWithTimeZone.
The following table describes the mapping between the return object data type and the data server data type.
DB2Type Data Type | Db2® Data Type | Informix® Data Type |
---|---|---|
TimeStampWithTimeZone | TIMESTAMP WITH TIMEZONE | N/A |
Call IsDBNull
to check for null values
before calling this method.