Data Format
Default and alternative date value formats vary. If using DB2 ECM, consult IBM documentation on differing formats. For OpenESQL, review the
DATE and
DATEDELIM SQL compiler directive option topics for more information.
For example, one supported date format is:
yyyy-mm-dd
An example value for this format is:
1994-05-24
Host Variable Formats
-
OpenESQL and DB2 ECM
-
01 date1 PIC X(10).
- OpenESQL
-
01 date2 SQL TYPE IS DATE.
01 date3 SQL TYPE IS DATE-RECORD.
01 date4 PIC X(n).
- date1 format
-
- date2 format
-
- date3 format
- Use this format when your application moves date data to host variables using ODBC escape sequences.
Note: This format is deprecated starting with
Enterprise Developer version 2.3. Instead, we strongly suggest that you use the DATE and DATEDELIM SQL compiler directive options to avoid using ODBC escape sequences.
- date4 format
-
- OpenESQL .NET Managed Runtime
- In addition to the definitions valid for all databases and those valid for OpenESQL, the following definition is also valid for the OpenESQL .NET Managed Runtime:
01 date5 type System.DateTime.