Oracle DATE data type
- Last Updated: March 30, 2020
- 1 minute read
- OpenEdge
- Version 12.2
- Documentation
Oracle DATE data type
The Oracle DATE data
type contains both date and time information. By default, in the
schema image, an Oracle date column is represented by two OpenEdge fields:
a DATE field and an INTEGER field. The
DataServer follows this convention when naming the fields: column column-1.
For example, an Oracle date column named Date_Due converts
to two fields named Date_Due and Date_Due-1 in
the schema image. Date_Due is a DATE field
and Date_Due-1 is an INTEGER field.
OpenEdge converts the time component of the Oracle date to an INTEGER value. To convert the INTEGER value into time, use ABL STRING and
TIME functions, as described in ABL
Reference.
You
can change the data type mapping for DATE to CHARACTER in
the schema image using the Data Dictionary. If you change the mapping,
you must remove the column representing the time as an INTEGER.
Use this feature only if you must use the time portion of an Oracle DATE in WHERE clauses.
The range of Oracle DATE are
the years 4712 B.C. to 4712 A.D. The range of DATE that
the DataServer supports are the years 999 B.C. to 9999 A.D. The
DataServer converts all years greater than 4712 to 4712. For example,
if your OpenEdge application updates a DATE column
with the year 4750, the DataServer converts it to 4712 before writing
it to the Oracle database.