# ADDDAYS

The ADDDAYS function allows you to add or subtract a specified number of days from a given date.

## Syntax

```java
ADDDAYS(date,value)
//adds the value to the date and returns it
```

## Arguments

date - Date in any format. Required. This can also be a measure or a node reference.

value - Number to be added to the date. Required. Use a negative number to subtract the days from the given date.

## Return Value

Date.

## Example

<figure><img src="https://3062809325-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEbkCXCUXmtUq5tcnUtZE%2Fuploads%2FaAdWL3WhIZAqumHZHCcP%2Fimage.png?alt=media&#x26;token=da67f418-21d2-4806-a66f-468e5140c5e2" alt=""><figcaption><p>ADDDAYS</p></figcaption></figure>

{% hint style="info" %}
You can also add or subtract days from a given date using the arithmetic operators.
{% endhint %}

<figure><img src="https://3062809325-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEbkCXCUXmtUq5tcnUtZE%2Fuploads%2F0RqcAch3fE34WiLMAbcU%2Fimage.png?alt=media&#x26;token=9c2b711e-eb08-4c82-be71-dc62e7b78c4e" alt=""><figcaption><p>Using Arithmetic Operators on Dates</p></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.inforiver.com/formula-syntax/date-functions/adddays.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
