If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.
%SUBDT extracts a portion of the information in a date, time, or timestamp value.
It returns an unsigned numeric value.
The first parameter is the date, time, or timestamp value.
The second parameter is the portion that you want to extract. The following
values are valid:
* For a date: *DAYS, *MONTHS, and *YEARS
* For a time: *SECONDS, *MINUTES, and *HOURS
* For a timestamp: *MSECONDS, *SECONDS, *MINUTES, *HOURS, *DAYS,
*MONTHS, and *YEARS
For this function, *DAYS always refers to the day of the month not the day
of the year (even if you are using a Julian date format). For example, the day
portion of February 10 is 10 not 41.
This function always returns a 4-digit year, even if the date format has a
2-digit year.
jamie
All my answers were extracted from the "Big Dummy's Guide to the As400"
and I take no responsibility for any of them.
Comment