If you migrated from IBM®VisualAge® Generator, you might define date, time, and timestamp columns from an SQL database as CHAR data in the corresponding EGL Record definitions. You can also set your preferences so that Records that EGL creates through the Data Access Application wizard or the SQL retrieve feature use a character type (CHAR, UNICODE, or STRING) for date/time data. These character fields that EGL creates can optionally include the sqlDataCode property, which preserves the column type from a DB2® SQL table.
The following table shows how the EGL debugger determines the proper formatting for date/time data.
| Data type | Formatting |
|---|---|
| EGL DATE, TIME, or TIMESTAMP | The value is passed between EGL and the database as a JDBC Date, Time, or Timestamp object. Neither EGL nor the JDBC driver needs to format the data. |
| character field with sqlDataCode property | The appropriate strLib.defaultDateFormat, defaultTimeFormat, or defaultTimeStampFormat system variable determines the format when the data is retrieved or written to the database. For the debugger, the initial values for these variables come from the debug build descriptor. |
| character field without sqlDataCode property | EGL does not format anything and uses whatever data is passed back and forth by the JDBC driver. |
For the possible values of n, see your DB2 documentation.
If you use a driver other than the DB2 JDBC Universal Driver, refer to your driver documentation for possible equivalents.
jdbc:db2://ctfmvs07.rtp.raleigh.ibm.com:9070/NQA17D03:retrieveMessagesFromServerOnGetMessage=true;dateFormat=2;timestampFormat=1;timestampPrecisionReporting=2;