9.74 FINDDATE_ALPHA
Finds the date that is 'n' days after or before a given date.
Arguments
No | Type | Req/ Opt | Description | Min Len | Max Len | Min Dec | Max Dec |
|---|---|---|---|---|---|---|---|
1 | A | Req | Date to be counted from | 1 | 10 | ||
2 | N | Req | No. of days(+/-) after/ before the given date. Note: For non-IBM i systems, this value should be less than 214783648 and greater than -214783649, otherwise a fatal execution error will occur. | 1 | 15 | 0 | 0 |
3 | A | Opt | Date format of given date Default: A | 1 | 1 | ||
4 | A | Opt | Date format of returned date Default: A | 1 | 1 |
Valid Date Formats
These date formats are valid formats for given and returned dates: A, B, C, D, E, F, G, H, I, J, K, L, M, V and 1.
Return Values
No | Type | Req/ Opt | Description | Min Len | Max Len | Min Dec | Max Dec |
|---|---|---|---|---|---|---|---|
1 | A | Req | Returned date | 1 | 10 | ||
2 | A | Opt | Returned okay code (Y/N) | 1 | 1 |
Example
Find the date field #NXTDAT in date format YYMMDD (D) that is #NUMD days after date field #DMY in date format DDMMYY (B):
USE BUILTIN(FINDDATE_ALPHA) WITH_ARGS(#DMY #NUMD B D)
TO_GET(#NXTDAT)