Try OpenEdge Now
skip to main content
DataServer for Oracle
Initial Programming Considerations : Data types : Working with Datetime data types : Converting data types within ABL
 
Converting data types within ABL
The following table describes the effects of converting from one ABL DATETIME data type to another:
Table 12. ABL DATETIME data type conversions
Source data type
Destination data type
Conversion
DATE
DATE
Straight copy.
DATE
DATETIME
Time portion of data type set by default to midnight (00:00:00:000).
DATE
DATETIME-TZ
Time portion of data type set by default to midnight (00:00:00:000) and timezone is set to time zone of the OpenEdge client session.
DATETIME
DATE
Date portion of the DATETIME value is retained. Time portion of DATETIME value is dropped.
DATETIME
DATETIME
Straight copy.
DATETIME
DATETIME-TZ
Destination's time zone becomes time zone of the OpenEdge client session.
DATETIME-TZ
DATE
DATETIME-TZ value is converted to destination's time zone before extracting date portion. Time and time zone portions are dropped. DATE value is converted to the local date of the OpenEdge client session.
DATETIME-TZ
DATETIME
DATETIME-TZ value converted to destination's time zone before extracting date and time. Time zone portion is dropped and DATETIME value is converted to the local time for the OpenEdge client session.
DATETIME-TZ
DATETIME-TZ
Straight copy.
OpenEdge initializes datetime values with NULL and then treats the whole DATETIME as UNKNOWN if any portion for the datetime value is NULL. By comparison, when Oracle performs data conversion, date values without a time component get a default time of 12:00:00 a.m. (midnight) or a time field set to 0.