Valid formats for times are listed in Table 2. Each format is identified by name and includes an associated
abbreviation (for use by the CHAR function) and an example of its use.
Table 2. Formats for Representations of Time Data Types
Format Name
Abbreviation
Time Format
Example
International Standards Organization
ISO
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
OS/400 format
-
HMS
13:30:05
Note:
Time separators can be either a period (.), slash (/), comma (,), dash (-), or a blank space. Use the
CHGJOB command to change the OS/400 date or time format separators.
In the USA time format, the hour must not be greater than 12 and cannot be 0 except for the special case
of 00:00 AM. Using the International Standards Organization (ISO) format of the 24-hour clock, the
correspondence between the USA format and the 24-hour clock is as follows:
USA Format
24 Hour-Clock
12:01 am through 12:59 am
00.01.00 through 00.59.00
01:00 am through 11:59 am
01.00.00 through 11.59.00
12:00 pm (noon) through 11:59 pm
12.00.00 through 23.59.00
12:00 am (midnight)
24.00.00
00:00 am (midnight)
00.00.00
The system always uses 00.00.00. Only the user can enter 24.00.00.
Query for iSeries timestamp
A
timestamp
expression is a seven-part value (year, month, day, hour, minute, second, and microsecond)
that designates a date and time as previously defined. The time part includes a fractional specification of
microseconds.
A timestamp data type starts with a digit and has a length of at least 16 characters. The complete
representation of a timestamp has the form
yyyy-mm-dd-hh.mm.ss.nnnnnn
. Trailing blanks can be
included. Leading zeros can be omitted from the month, day, and hour part of the timestamp. Trailing
zeros can be truncated or omitted entirely from microseconds. You do not need to specify microseconds. A
timestamp of
yyy-mm-dd-hh.mm.ss
is acceptable. If you choose to omit any digit of the microseconds
portion, an implicit specification of 0 is assumed. Thus,
1990-3-2-8.30.00.10
is equivalent to
1990-03-02-08.30.00.100000
.
A timestamp expression with a time of 24.00.00.000000 can be accepted.
68
Query for iSeries Use V5R2
Summary of Contents for ISERIES SC41-5210-04
Page 1: ...iSeries Query for iSeries Use Version 5 SC41 5210 04 ERserver ...
Page 2: ......
Page 3: ...iSeries Query for iSeries Use Version 5 SC41 5210 04 ERserver ...
Page 12: ...x Query for iSeries Use V5R2 ...
Page 14: ...2 Query for iSeries Use V5R2 ...
Page 32: ...20 Query for iSeries Use V5R2 ...
Page 38: ...26 Query for iSeries Use V5R2 ...
Page 44: ...32 Query for iSeries Use V5R2 ...
Page 116: ...104 Query for iSeries Use V5R2 ...
Page 122: ...110 Query for iSeries Use V5R2 ...
Page 146: ...134 Query for iSeries Use V5R2 ...
Page 150: ...138 Query for iSeries Use V5R2 ...
Page 174: ...162 Query for iSeries Use V5R2 ...
Page 178: ...166 Query for iSeries Use V5R2 ...
Page 196: ...184 Query for iSeries Use V5R2 ...
Page 198: ...186 Query for iSeries Use V5R2 ...
Page 204: ...192 Query for iSeries Use V5R2 ...
Page 205: ...Part 4 Appendixes Copyright IBM Corp 2000 2002 193 ...
Page 206: ...194 Query for iSeries Use V5R2 ...
Page 210: ...198 Query for iSeries Use V5R2 ...
Page 242: ...230 Query for iSeries Use V5R2 ...
Page 256: ...244 Query for iSeries Use V5R2 ...
Page 270: ...258 Query for iSeries Use V5R2 ...
Page 272: ...260 Query for iSeries Use V5R2 ...
Page 292: ...280 Query for iSeries Use V5R2 ...
Page 293: ......
Page 294: ... Printed in U S A SC41 5210 04 ...