TIME Query for iSeries function
The TIME function returns a time from a value. The form is:
QQ TIME (
expression
)
QR
The argument must be either a:
v
Time
v
Timestamp
v
Valid character representation of a time
The result of the function is a time value. If the argument can be null, the result can be null. If the
argument is null, the result is null.
v
If the argument is a timestamp, the result is the time part of the timestamp.
v
If the argument is a time, the result is that time.
v
If the argument is a character string, the result is the time represented by the character string.
Example:
TIME(TIMESTAMP) where TIMESTAMP = 1991-10-22-12.15.23.123456
The resulting value of TIME equals 12.15.23.
TIMESTAMP Query for iSeries function
The TIMESTAMP function returns a timestamp from a value or a pair of values. The form is:
QQ TIMESTAMP (
expression
)
expression
QR
The rules for the arguments depend on whether or not the second argument is specified.
v
If only one argument is specified, it must be either a:
– Timestamp
– Valid character representation of a timestamp
– Character string of length 14
Note:
A character string of length 14 must be a string of digits that represents a valid date and time in
the form
yyyyMMddhhmmss
where
yyyy
is the year,
MM
is the month,
dd
is the day,
hh
is the
hour,
mm
is the minute, and
ss
is the seconds.
v
If both arguments are specified, the first argument must be a date or a valid character representation of
a date. The second argument must be a time or a valid character representation of a time.
The result of the function is a timestamp. If either argument can be null, the result can be null. If either
argument is null, the result is null.
If both arguments are specified, the result is a timestamp with the date specified by the first argument and
the time specified by the second argument. The microsecond part of the timestamp is zero.
If only one argument is specified and it is a timestamp, the result is that timestamp. If only one argument
is specified and it is a character string, the result is the timestamp represented by that character string.
The timestamp represented by a string of length 14 has a microsecond part of zero.
Example:
Chapter 5. Defining result fields in Query for iSeries
79
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 ...