# 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>                                                                   |

![](https://3083465318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR50Wa7EwZGlmPSAMkkf%2Fuploads%2FKOKBXn9uoc6wWSoj5a8g%2F0.png?alt=media)

**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

![](https://3083465318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR50Wa7EwZGlmPSAMkkf%2Fuploads%2Fbltu5JDfDzmIYMA2CuxU%2F1.png?alt=media)

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="https://3083465318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR50Wa7EwZGlmPSAMkkf%2Fuploads%2F90FMj5K06FzFeE8KDLGB%2F2.png?alt=media" alt=""><figcaption></figcaption></figure>
