Displaying constants format in Query for iSeries
The Display Constants Format display shows you what date or time format you must use if you specify a
date or time constant and do not use an SAA format.
Display Constants Format
Query . . . . . . :
QRY1
Option . . . . . :
CHANGE
Library . . . . :
QGPL
CCSID . . . . . . :
65535
Use an SAA format to enter a date or time constant, or
use the format described by the following values.
Use the decimal separator shown.
Query definition values
Date format . . . . :
*MDY
Date separator . . :
/
Time format . . . . :
*HMS
Time separator . . :
:
Decimal separator . :
.
Press Enter to continue.
F12=CANCEL
The Display Constants Format display appears when you:
v
Change a query from the Work with Queries display and at least one date or time constant is specified
in the query definition in an OS/400 format other than the date or time format specified for your job.
v
Display a query from the Work with Queries display and your job format for the date or time is different
from an OS/400 date or time format constant that is specified in the query definition.
v
Use the run-time
record selection
option of the RUNQRY command and your job format for the date
or time is different from an OS/400 date or time format constant specified in the query definition.
v
Use the run-time
record selection
option with the QRYRUN procedure and your job format for the date
or time is different from an OS/400 date or time format constant specified in the query definition.
v
Press F17 from the Select Records display.
v
Press F17 from the Define Result Fields display.
OS/400 date formats are
MDY
,
YMD
,
DMY
, and
JUL
. The valid OS/400 time format is
HHMMSS
.
Date, time, and timestamp arithmetic operations in Query for iSeries
Addition and subtraction operations can be performed on date, time, and timestamp values to determine
the result-field value.
Note:
If an addition operand is a date, time, or timestamp value, the other operand must be a duration.
The following rules apply to date, time, and timestamp addition:
v
If one operand is a date, the other operand must be either a date duration or a labeled duration of
years, months, or days.
v
If one operand is a time, the other operand must be either a time duration or a labeled duration of
hours, minutes, or seconds.
v
If one operand is a timestamp, the other operand must be a duration. Any duration type is valid.
Chapter 5. Defining result fields in Query for iSeries
69
Содержание ISERIES SC41-5210-04
Страница 1: ...iSeries Query for iSeries Use Version 5 SC41 5210 04 ERserver ...
Страница 2: ......
Страница 3: ...iSeries Query for iSeries Use Version 5 SC41 5210 04 ERserver ...
Страница 12: ...x Query for iSeries Use V5R2 ...
Страница 14: ...2 Query for iSeries Use V5R2 ...
Страница 18: ...Figure 3 Major Tasks on the Query Menu and the Work with Queries Display 6 Query for iSeries Use V5R2 ...
Страница 32: ...20 Query for iSeries Use V5R2 ...
Страница 38: ...26 Query for iSeries Use V5R2 ...
Страница 44: ...32 Query for iSeries Use V5R2 ...
Страница 116: ...104 Query for iSeries Use V5R2 ...
Страница 122: ...110 Query for iSeries Use V5R2 ...
Страница 146: ...134 Query for iSeries Use V5R2 ...
Страница 150: ...138 Query for iSeries Use V5R2 ...
Страница 174: ...162 Query for iSeries Use V5R2 ...
Страница 178: ...166 Query for iSeries Use V5R2 ...
Страница 196: ...184 Query for iSeries Use V5R2 ...
Страница 198: ...186 Query for iSeries Use V5R2 ...
Страница 204: ...192 Query for iSeries Use V5R2 ...
Страница 205: ...Part 4 Appendixes Copyright IBM Corp 2000 2002 193 ...
Страница 206: ...194 Query for iSeries Use V5R2 ...
Страница 210: ...198 Query for iSeries Use V5R2 ...
Страница 242: ...230 Query for iSeries Use V5R2 ...
Страница 256: ...244 Query for iSeries Use V5R2 ...
Страница 270: ...258 Query for iSeries Use V5R2 ...
Страница 272: ...260 Query for iSeries Use V5R2 ...
Страница 292: ...280 Query for iSeries Use V5R2 ...
Страница 293: ......
Страница 294: ... Printed in U S A SC41 5210 04 ...