Performing data type conversions
- Last Updated: March 30, 2020
- 1 minute read
- OpenEdge
- Version 12.2
- Documentation
Performing data type conversions
Making changes between ABL and MS SQL Server data types will affect how the data is stored. The following tables describe the effects of changing one data type to another.
The following table provides details on converting ABL DATETIME data
types and MS SQL Server data types:
| Source (OpenEdge) | Target (MSS) | Default Conversion |
|---|---|---|
|
|
|
Straight copy of date portion. |
|
|
|
Straight copy of date portion. Time set to midnight up to millisecond precision (00:00:00.000). |
|
|
|
Straight copy of date portion. Time set to midnight up to 1 minute of accuracy. |
|
|
|
Straight copy of date portion. Time set to midnight up to millisecond precision (00:00:00.000). Time zone set to the OpenEdge client session time zone context. |
|
|
|
Straight copy of date portion of DATETIME value.
Time and time zone portion are dropped. |
|
|
|
Straight copy of the datetime portion up to millisecond precision. |
|
|
|
Straight copy of the datetime portion up to a minute of precision. |
|
|
|
Straight copy of time portion up to millisecond precision. Date portion is dropped. |
|
|
|
Straight copy of the datetime portion. Time zone set to the OpenEdge client time zone. |
|
|
|
Straight copy of the datetime portion of DATETIME-TZ value
(in client time-zone context) up to millisecond precision. Time
zone portion is dropped. |
|
|
|
Straight copy of the datetime portion of DATETIME-TZ value
(in client time-zone context) up to 1 minute of precision. Second
and millisecond portion is dropped. Time zone portion is dropped. |
|
|
|
Straight copy with millisecond precision. |
|
|
DATE
|
Straight copy of date portion of DATETIME-TZ value
(in client time-zone context). Time and time zone portion are dropped. |
The following table provides details on converting ABL DATETIME data
types and MS SQL Server data types:
| Source (MSS) | Target (OpenEdge) | Default Conversion |
|---|---|---|
|
|
|
Straight copy of date portion. |
|
|
|
Straight copy of date portion. Time portion is dropped. |
|
|
|
Receives MSS DATETIMEOFFSET (with
time zone context from the database). DataServer converts to OE
client time zone context. Date portion of converted timestamp is copied.
Time and time zone portions are dropped. |
|
|
|
Straight copy of the date portion into the DATETIME. Time
portion is set to 00:00:00 |
|
|
|
Straight copy of datetime portion up to millisecond level accuracy. |
|
|
|
Straight copy of datetime portion up 1 minute of accuracy. Second and millisecond portion set to 0. |
|
|
|
Straight copy with millisecond accuracy. |
|
|
|
Receives MSS DATETIMEOFFSET with
stored time zone context. DataServer converts to OE client time
zone context. Timestamp portion (in client time) is copied with millisecond
accuracy. Time zone portion is dropped. |
|
|
|
Straight copy of TIME portion up to millisecond
accuracy. Date portion is set to TODAY based on client time zone
context.1 |
|
|
|
Straight copy of the date portion into the DATETIME-TZ.
Time portion is set to 00:00:00. Time zone will be set to client
time zone context. |
|
|
|
Straight copy of the date and time portions
into the DATETIME-TZ up to millisecond of accuracy.
Time zone will be set to client time zone context. |
|
|
|
Straight copy of the date and time portions
of the MSS SMALLDATETIME with 1 minute accuracy. Time
zone will be set to client time zone context. |
|
|
|
Straight copy with millisecond accuracy. |
TIME data type in MS SQL Server is mapped to an
OpenEdge Datetime data type, the date portion defaults to TODAY's
date unless a valid date is specified for the -Dsrv
PRGRS_DATEPART_OVERRIDE switch at connection time. This switch allows the
user to set a date for this conversion other than TODAY's
date.