TIME FORMAT field (TIME DECP value)
The value of the TIME FORMAT field specifies which format is to be used as a default output to represent times.
| Acceptable values: | ISO, USA, EUR, JIS, LOCAL |
|---|---|
| Default: | ISO |
| Update: | not recommended |
| dsnhdecp: | TIME |
| Format name | Abbreviation | Time format | Example |
|---|---|---|---|
| International Standards Organization1 | ISO1 | hh.mm.ss | 13.30.05 |
| IBM® USA standard | USA | hh:mm AM or PM | 1:30 PM |
| IBM European standard | EUR | hh.mm.ss | 13.30.05 |
| Japanese Industrial Standard Christian Era | JIS | hh:mm:ss | 13:30:05 |
| Installation-defined | LOCAL | Any installation-defined form | — |
|
Note: 1. This is an earlier version of the ISO format. JIS can be used to get the current ISO format.
|
|||
In the USA format:
- The minutes can be omitted, thereby specifying 00 minutes. For example, 1 PM is equivalent to 1:00 PM.
- The letters A, M, and P can be lowercase.
- A single blank must precede the AM or PM.
- The hour must not be greater than 12 and cannot be 0 except for the special case of 00:00 AM.
Using the ISO format of the 24-hour clock, the correspondence between the USA format and the 24-hour clock is as follows:
- 12:01 AM through 12:59 AM correspond to 00.01.00 through 00.59.00.
- 01:00 AM through 11:59 AM correspond to 01.00.00 through 11.59.00.
- 12:00 PM (noon) through 11:59 PM correspond to 12.00.00 through 23.59.00.
- 12:00 AM (midnight) corresponds to 24.00.00.
- 00:00 AM (midnight) corresponds to 00.00.00.
Db2 can accept a time in any format as input. Db2 interprets the input time based on the punctuation and then provides time output in the format that you specify for this parameter. If you use LOCAL, you must provide a time exit routine to perform time formatting.