> For the complete documentation index, see [llms.txt](https://docs.inforiver.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.inforiver.com/premium-table/formula-syntax/date-functions/eomonth.md).

# EOMONTH

The EOMONTH function takes the date as input and returns the ending date of the month. Node references and measures are also accepted as input arguments. Use [DATE.SET()](https://docs.inforiver.com/~/changes/mS6jwvARNLHpKqBa4cT9/formula-syntax/date-functions/date.set) to set the format of the output date.

Optionally, you can specify an offset for the return date, which may be a positive or negative number. Additional months are added to or subtracted from the end date depending on the offset value.

## Syntax <a href="#syntax" id="syntax"></a>

```java
EOMONTH(date)
EOMONTH(date,offset)
```

## Arguments <a href="#arguments" id="arguments"></a>

date - The date which is passed as an input to the function. Required.

offset - Number of months to be added to or subtracted from the end date of the month. Optional.

## Return value <a href="#return-value" id="return-value"></a>

Date representing the end of the month.

## Example <a href="#example" id="example"></a>

```java
EOMONTH("05/29/2024")
//Returns 31/5/2024
EOMONTH("05/29/2024",3)
//Returns 31/8/2024, adding 3 more months to 31/5/2024
```

<figure><img src="https://content.gitbook.com/content/sB9HAei8v4FfKkH9M4gw/blobs/OxK0YJQrEHsvxg1FrGDv/image.png" alt=""><figcaption><p>EOMONTH</p></figcaption></figure>

If you wish to add one or two more months to the ending date, you can use 1 or 2 as offset values respectively.

<figure><img src="https://content.gitbook.com/content/sB9HAei8v4FfKkH9M4gw/blobs/QXiR64a1QROezj3OC7r0/image.png" alt=""><figcaption><p>EOMONTH with offset</p></figcaption></figure>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.inforiver.com/premium-table/formula-syntax/date-functions/eomonth.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
