
Chapter 9. Other considerations 211
Table 9-12 Duration codes
The duration code must be consistent with the result field data type:
To a date field only years, months, or days can be added or subtracted.
To a time field only hours, minutes, or seconds can be added or subtracted.
To a timestamp field years, months, days, hours, minutes, seconds, or microseconds can
be added or subtracted.
Example 9-35 shows how durations can be added and subtracted using the operation codes
ADDDUR and SUBDUR.
Example 9-35 Adding/subtracting durations using operation codes ADDDUR and SUBDUR
D MyDate S D
D MyTime S T
D NbrDays S ...