> For the complete documentation index, see [llms.txt](https://documentation.astera.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.astera.com/astera-data-stack-v10/functions/date-time/age-datetimeoffset.md).

# Age (DateTimeOffset)

| **Name**    | ***Age With Offset***                                                                                                                                                     |
| ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Syntax      | Age (DateTimeWithOffset start, DateTimeWithOffset end, Integer interval)                                                                                                  |
| Purpose     | To compute the difference between two specified date time offset values, based on interval type (year, Month etc.) provided in integer form.                              |
| Description | Compute the difference between two dates and return age in a specified interval. Valid values for interval: 1=Year, 2=Month, 3=Week, 4=Day, 5=Hour, 6=Minute, or 7=Second |
| Return Type | Int64                                                                                                                                                                     |
| Parameters  | <p>start \[System.DateTimeOffset]</p><p>end \[System.DateTimeOffset]</p><p>interval \[System.Int32]</p>                                                                   |

![](/files/bZaidFWcF85QI8M4fGIs)

**Example**

In this example, we will pass date time offset values, and an integer value (indicating a specific interval) to the function transformation object using a *Variables* object.

Where,

*start* = 01/03/2022

*end* = 06/06/2022

*interval (3=week)* = 3

![](/files/PDl9ogNRuClSIrF0NixK)

In the output window, you can see that the provided interval value, indicating weeks, has been used to compute the age between the two specified date time offset values.

<figure><img src="/files/neHYUs6qxB51WZqWBGuJ" alt=""><figcaption></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 dynamically by asking a question.

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

```
GET https://documentation.astera.com/astera-data-stack-v10/functions/date-time/age-datetimeoffset.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.
