Try OpenEdge Now
skip to main content
DataServer for Oracle
Initial Programming Considerations : Data types : Working with Datetime data types : Converting Oracle TIMESTAMP types to ABL DATETIME types
 
Converting Oracle TIMESTAMP types to ABL DATETIME types
The following table provides details on converting Oracle TIMESTAMP data types to similar OpenEdge data types.
Table 14. Converting Oracle TIMESTAMP types to ABL DATETIME types
Source Data Type (Oracle)
Destination Data Type (OpenEdge)
Default Conversion
Non-default Conversion
DATE
DATE
Straight copy of date portion. Time portion is dropped.
Straight copy of date portion. Time portion is dropped.
TIMESTAMP
DATE
Straight copy of date portion. Time portion is dropped.
Straight copy of date portion. Time portion is dropped.
TIMESTAMP-LTZ
DATE
Oracle converts TIMESTAMP-LTZ to Oracle session time zone (UTC). DataServer converts UTC to OpenEdge client time zone. Date portion of converted timestamp is copied. Time and time zone portions are dropped.
Oracle converts TIMESTAMP-LTZ to Oracle session time defined by the application to the Oracle client OCI driver. Date portion in session time is copied. Time and time zone portions are dropped.
TIMESTAMP-TZ
DATE
Receives Oracle TIMESTAMP-TZ with time zone context from the database. DataServer converts to OpenEdge client time zone context. Date portion of converted timestamp is copied. Time and time zone portions are dropped.
Receives Oracle TIMESTAMP-TZ with timezone from the database. DataServer converts Oracle TIMESTAMP-TZ to Oracle session time (defined by the application to the Oracle client OCI driver). Date portion of converted timestamp is copied. Time and time zone portions are dropped.
DATE
DATETIME
Straight copy of datetime portion up to second level accuracy. Millisecond portion will be set to ‘000'.
Straight copy of datetime portion up to second level accuracy. Millisecond portion will be set to ‘000'.
TIMESTAMP
DATETIME
Straight copy with millisecond precision.
Straight copy with millisecond precision.
TIMESTAMP-LTZ
DATETIME
Oracle converts TIMESTAMP-LTZ to Oracle session time zone (UTC). DataServer converts UTC to OpenEdge local time zone context accuracy. Timestamp in client time is copied with millisecond accuracy. Time zone portion is dropped.
Oracle converts TIMESTAMP-LTZ to Oracle session time context defined by the application to the Oracle client OCI driver. Timestamp in session time is copied with millisecond accuracy. Timezone will be dropped.
TIMESTAMP-TZ
DATETIME
Receives Oracle TIMESTAMP-TZ with stored time zone context. DataServer converts to OpenEdge client time zone context. Timestamp portion in client time is copied with millisecond accuracy. Timezone portion is dropped.
Receives Oracle TIMESTAMP-TZ with stored time zone context. DataServer converts to Oracle session time defined by the application to the Oracle client OCI driver. Timestamp portion in session time is copied with millisecond accuracy. Time zone portion is dropped.
DATE
DATETIME-TZ
Straight copy of the date and time portions of the Oracle DATE type into the DATETIME-TZ. Millisecond portion will be set to '000'. Time zone will be set to OpenEdge client time zone context.
Straight copy of the date and time portions of the Oracle DATE type into the DATETIME-TZ. Millisecond portion will be set to '000'. Time zone will be set to Oracle session time zone context defined by the application to the Oracle client OCI driver.
TIMESTAMP
DATETIME-TZ
Straight copy of the Oracle TIMESTAMP into the DATETIME portion of the DATETIME-TZ with millisecond accuracy. Time zone is set to OpenEdge client time zone context.
Straight copy of the Oracle TIMESTAMP into the DATETIME portion of the DATETIME-TZ with millisecond accuracy. Time zone is set to Oracle session time zone context defined by the application to the Oracle client OCI driver.
TIMESTAMP-LTZ
DATETIME-TZ
Oracle converts TIMESTAMP-LTZ to Oracle session timezone (UTC). DataServers then converts UTC to OpenEdge client timezone context with millisecond accuracy and stores the client time zone context.
Oracle converts TIMESSTAMP-LTZ to Oracle session timezone defined by application to the Oracle client OCI driver. Timestamp with its timezone context in session time is passed directly into the DATETIME-TZ value with millisecond accuracy and stores the session time zone context.
TIMESTAMP-TZ
DATETIME-TZ
Straight copy with millisecond accuracy.
Straight copy with millisecond accuracy.