> 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/~/changes/mS6jwvARNLHpKqBa4cT9/formula-syntax/date-functions.md). Agents can also search and read this documentation through its [MCP server](https://docs.inforiver.com/~gitbook/mcp).

# Date functions

<table><thead><tr><th width="264">NAME</th><th>DESCRIPTION</th></tr></thead><tbody><tr><td><a href="https://docs.inforiver.com/~/changes/mS6jwvARNLHpKqBa4cT9/formula-syntax/date-functions/dateadd.md">DATEADD</a></td><td>Adds a specified number of days to the input date</td></tr><tr><td><a href="https://docs.inforiver.com/~/changes/mS6jwvARNLHpKqBa4cT9/formula-syntax/date-functions/datediff.md">DATEDIFF</a></td><td>Returns the number of days between two input dates</td></tr><tr><td><a href="https://docs.inforiver.com/~/changes/mS6jwvARNLHpKqBa4cT9/formula-syntax/date-functions/day.md">DAY</a></td><td>Extracts the day of the month from an input date</td></tr><tr><td><a href="https://docs.inforiver.com/~/changes/mS6jwvARNLHpKqBa4cT9/formula-syntax/date-functions/date.md">DATE</a></td><td>Returns a date in the specified format</td></tr><tr><td><a href="https://docs.inforiver.com/~/changes/mS6jwvARNLHpKqBa4cT9/formula-syntax/date-functions/date.set.md">DATE.SET</a></td><td>Returns a date after changing the format</td></tr><tr><td><a href="https://docs.inforiver.com/~/changes/mS6jwvARNLHpKqBa4cT9/formula-syntax/date-functions/date.format.md">DATE.FORMAT</a></td><td>Returns the current date in the specified format</td></tr><tr><td><a href="https://docs.inforiver.com/~/changes/mS6jwvARNLHpKqBa4cT9/formula-syntax/date-functions/soweek.md">SOWEEK</a></td><td>Returns the starting date of the week</td></tr><tr><td><a href="https://docs.inforiver.com/~/changes/mS6jwvARNLHpKqBa4cT9/formula-syntax/date-functions/somonth.md">SOMONTH</a></td><td>Returns the starting date of the month</td></tr><tr><td><a href="https://docs.inforiver.com/~/changes/mS6jwvARNLHpKqBa4cT9/formula-syntax/date-functions/soqtr.md">SOQTR</a></td><td>Returns the starting date of the quarter</td></tr><tr><td><a href="https://docs.inforiver.com/~/changes/mS6jwvARNLHpKqBa4cT9/formula-syntax/date-functions/soyear.md">SOYEAR</a></td><td>Returns the starting date of the year</td></tr><tr><td><a href="https://docs.inforiver.com/~/changes/mS6jwvARNLHpKqBa4cT9/formula-syntax/date-functions/eoweek.md">EOWEEK</a></td><td>Returns the last date of the week</td></tr><tr><td><a href="https://docs.inforiver.com/~/changes/mS6jwvARNLHpKqBa4cT9/formula-syntax/date-functions/eomonth.md">EOMONTH</a></td><td>Returns the last date of the month</td></tr><tr><td><a href="https://docs.inforiver.com/~/changes/mS6jwvARNLHpKqBa4cT9/formula-syntax/date-functions/eoqtr.md">EOQTR</a></td><td>Returns the last date of the quarter</td></tr><tr><td><a href="https://docs.inforiver.com/~/changes/mS6jwvARNLHpKqBa4cT9/formula-syntax/date-functions/eoyear.md">EOYEAR</a></td><td>Returns the last date of the year</td></tr><tr><td><a href="https://docs.inforiver.com/~/changes/mS6jwvARNLHpKqBa4cT9/formula-syntax/date-functions/networkdays.md">NETWORKDAYS</a></td><td>Returns the number of workdays between two input dates</td></tr><tr><td><a href="https://docs.inforiver.com/~/changes/mS6jwvARNLHpKqBa4cT9/formula-syntax/date-functions/adddays.md">ADDDAYS</a></td><td>Adds a specified number of days to the input date</td></tr><tr><td><a href="https://docs.inforiver.com/~/changes/mS6jwvARNLHpKqBa4cT9/formula-syntax/date-functions/addweeks.md">ADDWEEKS</a></td><td>Adds a specified number of weeks to the input date</td></tr><tr><td><a href="https://docs.inforiver.com/~/changes/mS6jwvARNLHpKqBa4cT9/formula-syntax/date-functions/addmonths.md">ADDMONTHS</a></td><td>Adds a specified number of months to the input date</td></tr><tr><td><a href="https://docs.inforiver.com/~/changes/mS6jwvARNLHpKqBa4cT9/formula-syntax/date-functions/addqtrs.md">ADDQTRS</a></td><td>Adds a specified number of quarters to the input date</td></tr><tr><td><a href="https://docs.inforiver.com/~/changes/mS6jwvARNLHpKqBa4cT9/formula-syntax/date-functions/addyears.md">ADDYEARS</a></td><td>Adds a specified number of years to the input date</td></tr><tr><td><a href="https://docs.inforiver.com/~/changes/mS6jwvARNLHpKqBa4cT9/formula-syntax/date-functions/fromexceldate.md">FROMEXCELDATE</a></td><td>Converts an input date to a excel format date serial number</td></tr><tr><td><a href="https://docs.inforiver.com/~/changes/mS6jwvARNLHpKqBa4cT9/formula-syntax/date-functions/month.md">MONTH</a></td><td>Extracts the month from an input date</td></tr><tr><td><a href="https://docs.inforiver.com/~/changes/mS6jwvARNLHpKqBa4cT9/formula-syntax/date-functions/now.md">NOW</a></td><td>Returns the current date and timestamp</td></tr><tr><td><a href="https://docs.inforiver.com/~/changes/mS6jwvARNLHpKqBa4cT9/formula-syntax/date-functions/today.md">TODAY</a></td><td>Returns the current date</td></tr><tr><td><a href="https://docs.inforiver.com/~/changes/mS6jwvARNLHpKqBa4cT9/formula-syntax/date-functions/toexceldate.md">TOEXCELDATE </a></td><td>Converts an excel recognized serial number to the equivalent date</td></tr><tr><td><a href="https://docs.inforiver.com/~/changes/mS6jwvARNLHpKqBa4cT9/formula-syntax/date-functions/year.md">YEAR</a></td><td>Extracts the year from an input date</td></tr></tbody></table>


---

# 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/~/changes/mS6jwvARNLHpKqBa4cT9/formula-syntax/date-functions.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.
