Supported DATE, TIME, and TIMESTAMP formats
When using DIRECT NO, DATE-format, TIMESTAMP-format, or TIME-format formats requires extra consideration due to the various ways in which the data is returned from Db2. Often, the same DATE-format, TIMESTAMP-format, or TIME-format formats are not appropriate when using DIRECT YES versus DIRECT NO.
The following table describes the Date format:
Format number Char/Int/Dec | Nondelimited format | Format number Char | Delimited format 1 |
---|---|---|---|
1 | MMDDYY | D1 | MM/DD/YY |
2 | YYMMDD | D2 | YY/MM/DD |
3 | YYDDD | D3 | YY/DDD |
4 | YYWWD | D4 | YY/WW/D |
5 | DDMMYY | D5 | DD/MM/YY |
6 | DDDDD |
|
|
1E | MMDDYYYY | D1E | MM/DD/YYYY |
2E | YYYYMMDD | D2E | YYYY/MM/DD |
3E | YYYYDDD | D3E | YYYY/DDD |
4E | YYYYWWD | D4E | YYYY/WW/D |
5E | DDMMYYYY | D5E | DD/MM/YYYY |
1 ‘/’ can be any character.
The following tables describe the Timestamp formats:
Format number | Nondelimited format 1 |
---|---|
1 | YYMMDDHHMMSS |
2 | YYMMDDHHMMSSNNNNNN 2 |
3 | Store clock 8-byte binary |
1E | YYYYMMDDHHMMSS |
2E | YYYYMMDDHHMMSSNNNNNN 2 |
1 Format is CHAR only except 3.
2 The number of microseconds (N) can be from 0 through 12.
The following table describes the Time format: