AYMD: Adding or Subtracting Days

How to:

The AYMD function adds days to or subtracts days from a date in year-month-day format. You can convert a date to this format using the CHGDAT or EDIT function.

Syntax: How to Add or Subtract Days to or From a Date

AYMD(indate, days, output)

where:

indate

I6, I6YMD, I8, I8YYMD

Is the legacy date in year-month-day format. If the date is not valid, the function returns the value 0 (zero).

days

Integer

Is the number of days you are adding to or subtracting from indate. To subtract days, use a negative number.

output

I6, I6YMD, I8, or I8YYMD

If the addition or subtraction of days crosses forward or backward into another century, the century digits of the output year are adjusted.

Example: Adding Days to a Date

WebFOCUS

Feedback