ADD_DAYS Function


Description: Ages the date field by the specified number of days. The days specified are added to the source date provided. If the number of days is a negative number, the value is subtracted. The result is the actual calculated date.

This function is only valid for data elements with a processing type of date. The ADD_DAYS function rolls forward or backward the specified number of days based on the year. It takes leap year and the number of days in a month into consideration when aging the date. Aging of the date must result in a valid date. This function may cause the month and/or year to change as well as the day. ADD_DAYS is the only aging function that is reversible.

Parameters: String, Integer

  • Source date: The string containing the source date value.
  • Days: The number of days to age. Specify the number of days to add or specify a negative value to subtract days.

Return: String containing the result date.

Syntax: ADD_DAYS (<source date>,<days>)

Example: Set the birth date to 15 days beyond the original birth date:

DE("Birth Date").setValue
( ADD_DAYS( DE("Birth Date").getOriginalValue( ), 15) );

{{export-indexterm primary="ADD_DAYS function"/}}

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*