> For the complete documentation index, see [llms.txt](https://docs.onum.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.onum.com/the-workspace/pipelines/actions/transformation/date-operations.md).

# Date Operations

{% hint style="info" %}
See the changelog of this Action type [here](/actions/json-transformation.md).
{% endhint %}

## Overview

Perfrom a list of operations on date fields.

{% hint style="warning" %}
In order to configure this Action, you must first link it to a Listener. Go to [Building a Pipeline ](/the-workspace/pipelines/building-a-pipeline.md)to learn how to link.
{% endhint %}

## Ports

These are the input and output ports of this Action:

<details>

<summary>Input ports</summary>

* **Default port** - All the events to be processed by this Action enter through this port.

</details>

<details>

<summary>Output ports</summary>

* **Default port** - Events are sent through this port if no error occurs while processing them.
* **Error port** - Events are sent through this port if an error occurs while processing them.

</details>

## Configuration

{% stepper %}
{% step %}
Find **Date Operations** in the **Actions** tab (under the **Transformation** group) and drag it onto the canvas.
{% endstep %}

{% step %}
To open the configuration, click the Action in the canvas and select **Configuration**.
{% endstep %}

{% step %}
Choose one of the available **Operations** and configure it as required:

<table><thead><tr><th width="173.21875">Operation</th><th>Parameter</th><th data-hidden></th></tr></thead><tbody><tr><td><strong>Add duration</strong></td><td><ul><li><strong>Timestamp</strong><mark style="color:red;"><strong>*</strong></mark> - Select the field from the Listener or Action that contains the timestamp value.</li><li><strong>Duration</strong><mark style="color:red;"><strong>*</strong></mark> - Select the field from the Listener or Action that contains the duration value.</li><li><strong>Unit</strong><mark style="color:red;"><strong>*</strong></mark> - Select the unit of measurement (milliseconds, seconds, minutes, hours, days) used to calculate the new date.</li><li><strong>Output field</strong><mark style="color:red;"><strong>*</strong></mark> - Give a name to the output field with this new value.</li></ul></td><td></td></tr><tr><td><strong>Subtract duration</strong></td><td><ul><li><strong>Timestamp</strong><mark style="color:red;"><strong>*</strong></mark> - Select the field from the Listener or Action that contains the timestamp value.</li><li><strong>Duration</strong><mark style="color:red;"><strong>*</strong></mark> - Select the field from the Listener or Action that contains the duration value.</li><li><strong>Unit</strong><mark style="color:red;"><strong>*</strong></mark> - Select the unit of measurement (milliseconds, seconds, minutes, hours, days) used to calculate the new date.</li><li><strong>Output field</strong><mark style="color:red;"><strong>*</strong></mark> - Give a name to the output field with this new value.</li></ul></td><td></td></tr><tr><td><strong>Timestamp difference</strong></td><td><ul><li><strong>Timestamp</strong><mark style="color:red;"><strong>*</strong></mark> - Select the field from the Listener or Action that contains the timestamp value.</li><li><strong>Timestamp 2</strong><mark style="color:red;"><strong>*</strong></mark> - Select the field from the Listener or Action that contains the timestamp to compare against.</li><li><strong>Result Unit</strong><mark style="color:red;"><strong>*</strong></mark> - Select the unit of measurement (milliseconds, seconds, minutes, hours, days) used to calculate the new date.</li><li><strong>Output field</strong><mark style="color:red;"><strong>*</strong></mark> - Give a name to the output field with this new value.</li></ul></td><td></td></tr></tbody></table>
{% endstep %}

{% step %}
Click **Save** to complete the process.
{% endstep %}
{% endstepper %}


---

# 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://docs.onum.com/the-workspace/pipelines/actions/transformation/date-operations.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.
