Working with MS SQL Server and ABL datetime data types
- Last Updated: February 11, 2026
- 3 minute read
- OpenEdge
- Version 13.0
- Documentation
The following table defines the MS SQL Server 2000, 2005 and 2008 data types and identifies compatible ABL data types.
| MS SQL Server data type | Description | Compatible OpenEdge data types |
|---|---|---|
DATETIME
|
Provides date and time data to an accuracy of one three-hundredth of a second (equivalent to 3.33 milliseconds or 0.00333 seconds). Values are rounded to increments of .000, .003, or .007. |
DATE1
|
SMALLDATETIME
|
Provides date and time data with accuracy to the minute. |
DATE1
|
Beginning in OpenEdge Release 10.2B, the DataServer for MS SQL
Server supports mappings of MS SQL Server datetime data types DATETIME and SMALLDATETIME to
OpenEdge data type DATETIME-TZ along with the compatible
OpenEdge types listed in Table 1.
MS SQL Server 2008 offers the DATETIMEOFFSET data
type to support time zones in a datetime column as well as three
other datetime data types. The following table defines the MS SQL
2008 data types and identifies compatible ABL data types.
| MS SQL Server data type | Description | Compatible OpenEdge data types |
|---|---|---|
DATE
|
Provides day of the year based on the Gregorian calendar. |
DATE5
|
TIME
|
Provides time of day based on 24-hour clock. |
|
DATETIME2
|
Provides variable precision of up to 100 nanoseconds. | DATE
|
DATETIMEOFFSET
|
Provides date and time data with time zone offset and variable precision of up to 100 nanoseconds. |
DATE
|
The ABL DATETIME and DATETIME-TZ data
types are compatible with datetime data types supported by MS SQL
Server. The following table provides details on compatibility:
| ABL Data Type | Definition | MS SQL Server compatible data type |
|---|---|---|
DATE
|
ABL date contains only a calendar date component and there is no time zone element to it. |
DATETIME
8
|
DATETIME
10
|
The DATETIME data type consists
of two parts, one an ABL date and one an ABL time. The unit of time is
milliseconds from midnight. |
DATE11
|
DATETIME-TZ
12
|
Variation of DATETIME data
type with time zone offset. |
DATE11
|
DateTime/TZ data types to
the legacy MS SQL Server DateTime data type, the same 3.33 millisecond
accuracy that SQL Server uses is applied to OpenEdge values with millisecond precision. This
means that .989, .990 and .991 round to .990, .992, .993 and .994 round to .993, .995, .996,
.997 and .998 round to .997 and .999 rounds up to 1.000.DateTime/TZ data types to
the legacy MS SQL Server SmallDateTime data type, the same minute accuracy
that SQL Server uses is applied to OpenEdge values to with second or greater precision. This
means that seconds values up to 29.998 seconds will round down to zero and values from
29.999 seconds and up will round up to the next minute.DATETIME column. NOTE: The time component is truncated rather than
rounded in order to be consistent with MS SQL Server which also truncates the value when
converting between two datetime data types defined with inconsistent fractional
accuracy.