# Translate datetime NITES format

## Description

This operation parses a datetime string in one format and rewrites it in another format, taking into account both the input and output time zones. This is useful for applications that need to handle and display datetime values in various formats and time zones.

For the complete format reference and additional documentation, see the [gotime Nites Format Documentation](https://github.com/maniartech/gotime/blob/master/docs/core-concepts/nites.md#complete-format-reference).

### Supported formats

The operation supports a comprehensive set of format tokens for both input and output formats:

<details>

<summary>Date formats</summary>

<table><thead><tr><th width="129.86328125">Format</th><th width="119.73828125">Output</th><th width="339.9140625">Description</th><th>Example</th></tr></thead><tbody><tr><td><code>y</code></td><td>6</td><td>1-digit year (last digit)</td><td>2026 → 6</td></tr><tr><td><code>yy</code></td><td>06</td><td>2-digit year with leading zero</td><td>2026 → 26</td></tr><tr><td><code>yyyy</code></td><td>2006</td><td>4-digit year</td><td>2026 → 2026</td></tr><tr><td><code>m</code></td><td>1</td><td>Month without leading zero</td><td>January → 1</td></tr><tr><td><code>mm</code></td><td>01</td><td>Month with leading zero</td><td>January → 01</td></tr><tr><td><code>mt</code></td><td>1st</td><td>Month in ordinal format</td><td>January → 1st</td></tr><tr><td><code>mmm</code></td><td>Jan</td><td>Month short name</td><td>January → Jan</td></tr><tr><td><code>mmmm</code></td><td>January</td><td>Month full name</td><td>January → January</td></tr><tr><td><code>d</code></td><td>2</td><td>Day without leading zero</td><td>2nd → 2</td></tr><tr><td><code>dd</code></td><td>02</td><td>Day with leading zero</td><td>2nd → 02</td></tr><tr><td><code>db</code></td><td>2</td><td>Day blank-padded</td><td>2nd → 2</td></tr><tr><td><code>dt</code></td><td>2nd</td><td>Day in ordinal format</td><td>2nd → 2nd</td></tr><tr><td><code>ddd</code></td><td>002</td><td>Day of year (zero-padded)</td><td>Jan 2 → 002</td></tr><tr><td><code>www</code></td><td>Mon</td><td>Weekday short name</td><td>Monday → Mon</td></tr><tr><td><code>wwww</code></td><td>Monday</td><td>Weekday full name</td><td>Monday → Monday</td></tr></tbody></table>

</details>

<details>

<summary>Time formats</summary>

<table><thead><tr><th width="130.203125">Format</th><th width="119.9453125">Output</th><th width="340.2578125">Description</th><th>Example</th></tr></thead><tbody><tr><td><code>h</code></td><td>3</td><td>Hour 12-format, no leading zero</td><td>3 AM → 3</td></tr><tr><td><code>hh</code></td><td>03</td><td>Hour 12-format, with leading zero</td><td>3 AM → 03</td></tr><tr><td><code>hhhh</code></td><td>15</td><td>Hour 24-format with leading zero</td><td>3 PM → 15</td></tr><tr><td><code>i</code></td><td>4</td><td>Minute without leading zero</td><td>04:04 → 4</td></tr><tr><td><code>ii</code></td><td>04</td><td>Minute with leading zero</td><td>04:04 → 04</td></tr><tr><td><code>s</code></td><td>5</td><td>Second without leading zero</td><td>05 seconds → 5</td></tr><tr><td><code>ss</code></td><td>05</td><td>Second with leading zero</td><td>05 seconds → 05</td></tr><tr><td><code>a</code></td><td>pm</td><td>AM/PM lowercase</td><td>3 PM → pm</td></tr><tr><td><code>aa</code></td><td>PM</td><td>AM/PM uppercase</td><td>3 PM → PM</td></tr><tr><td><code>.0</code></td><td>.000</td><td>Microseconds with leading zeros</td><td>-</td></tr><tr><td><code>.9</code></td><td>.999</td><td>Microseconds without trailing zeros</td><td>-</td></tr></tbody></table>

</details>

<details>

<summary>Timezone formats</summary>

<table><thead><tr><th width="129.96484375">Format</th><th width="120.28515625">Output</th><th width="339.6171875">Description</th><th>Example</th></tr></thead><tbody><tr><td><code>z</code></td><td>Z</td><td>UTC indicator</td><td>UTC → Z</td></tr><tr><td><code>zz</code></td><td>MST</td><td>Timezone abbreviation</td><td>Mountain → MST</td></tr><tr><td><code>o</code></td><td>±07</td><td>Timezone offset (hours only)</td><td>UTC+7 → +07</td></tr><tr><td><code>oo</code></td><td>±0700</td><td>Timezone offset (no colon)</td><td>UTC+7 → +0700</td></tr><tr><td><code>ooo</code></td><td>±07:00</td><td>Timezone offset (with colon)</td><td>UTC+7 → +07:00</td></tr></tbody></table>

</details>

### Predefined format constants

The operation also supports several predefined format constants for common use cases:

<details>

<summary>Predefined formats</summary>

<table><thead><tr><th width="149.59375">Constant</th><th width="209.95703125">Format</th><th>Description</th></tr></thead><tbody><tr><td>RFC3339</td><td><code>yyyy-mm-ddThhh:ii:ssooo</code></td><td>ISO 8601 format with timezone offset</td></tr><tr><td>RFC3339Nano</td><td><code>yyyy-mm-ddThhh:ii:ss.9z</code></td><td>ISO 8601 format with nanoseconds</td></tr><tr><td>ANSIC</td><td><code>www mmm db hhh:ii:ss yyyy</code></td><td>ANSI C format</td></tr><tr><td>UnixDate</td><td><code>www mmm db hhh:ii:ss zz yyyy</code></td><td>Unix date format</td></tr><tr><td>RFC1123</td><td><code>www, dd mmm yyyy hhh:ii:ss zz</code></td><td>RFC 1123 format</td></tr><tr><td>RFC1123Z</td><td><code>www, dd mmm yyyy hhh:ii:ss oo</code></td><td>RFC 1123 format with timezone offset</td></tr><tr><td>DateOnly</td><td><code>yyyy-mm-dd</code></td><td>Date only format</td></tr><tr><td>DateTime</td><td><code>yyyy-mm-dd hhhh:ii:ss</code></td><td>Date and time format</td></tr><tr><td>TimeOnly</td><td><code>hhhh:ii:ss</code></td><td>Time only format</td></tr></tbody></table>

</details>

### Timezone support

The following time zones are supported for both the **Input timezone** and the **Output timezone** parameters:

<details>

<summary>Supported timezones</summary>

<table><thead><tr><th width="223.62890625">Timezone</th><th>Description</th></tr></thead><tbody><tr><td><code>UTC</code></td><td>Coordinated Universal Time</td></tr><tr><td><code>GMT</code></td><td>Greenwich Mean Time</td></tr><tr><td><code>PST</code></td><td>Pacific Standard Time (UTC-8)</td></tr><tr><td><code>PDT</code></td><td>Pacific Daylight Time (UTC-7)</td></tr><tr><td><code>CET</code></td><td>Central European Time (UTC+1)</td></tr><tr><td><code>CEST</code></td><td>Central European Summer Time (UTC+2)</td></tr><tr><td>Any IANA Time Zone</td><td>e.g. <code>America/Los_Angeles</code></td></tr><tr><td>GMT offsets</td><td>e.g. <code>GMT+2</code>, <code>UTC-5</code></td></tr></tbody></table>

</details>

***

## Data types

These are the input/output expected data types for this operation:

### Input data

![](https://965373739-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkxZeV4nlXcIAjMGZxzLI%2Fuploads%2FlhX6TulmEB3panGmzSqZ%2Fimage.png?alt=media\&token=17fa9d2d-c8ea-4e0c-800b-5dbe04dfb396) - Strings representing the dates you want to convert.

### Output data

![](https://965373739-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkxZeV4nlXcIAjMGZxzLI%2Fuploads%2FwTb2oTb0LEAHXBbhwEP9%2Fimage.png?alt=media\&token=9b224990-9f87-48b5-8995-5e7e62e71a79) - Output formatted date strings.

***

## Parameters

These are the parameters you need to configure to use this operation (mandatory parameters are marked with a <mark style="color:red;">**\***</mark>):

<details>

<summary>Input Format<mark style="color:red;"><strong>*</strong></mark></summary>

Specify the format of your input date strings. Check the allowed formats in the description above.

{% hint style="warning" %}

* When using formats without year tokens (e.g., `mm/dd`), the current year will be used.
* All format tokens are case-sensitive and must be used exactly as specified.
  {% endhint %}

</details>

<details>

<summary>Input Timezone</summary>

Specify the timezone of the input date strings. Check the allowed formats in the description above. If not provided, the default value is `UTC`.

{% hint style="warning" %}

* Timezone conversion is only applied when both input and output formats contain time information.
* All format tokens are case-sensitive and must be used exactly as specified
  {% endhint %}

</details>

<details>

<summary>Output Format<mark style="color:red;"><strong>*</strong></mark></summary>

Specify the desired format of your output date strings. Check the allowed formats in the description above.

{% hint style="warning" %}

* When using formats without year tokens (e.g., `mm/dd`), the current year will be used.
* All format tokens are case-sensitive and must be used exactly as specified.
  {% endhint %}

</details>

<details>

<summary>Output Timezone</summary>

Specify the timezone of the output date strings. Check the allowed formats in the description above. If not provided, the default value is `UTC`.

{% hint style="warning" %}

* Timezone conversion is only applied when both input and output formats contain time information.
* All format tokens are case-sensitive and must be used exactly as specified
  {% endhint %}

</details>

***

## Example

Suppose you want to convert a series of dates in the following format:

`yyyy-mm-dd hhh:ii:ss`

into this one:

`dd-mm-yyyy hhh:ii:ss`

1. In your Pipeline, open the required [Action](https://onum.gitbook.io/onum-docs/the-workspace/pipelines/actions) configuration and select the input **Field**.
2. In the **Operation** field, choose **Translate Datetime NITES Format**.
3. Set **Input Format** to `yyyy-mm-dd hhh:ii:ss`
4. Set **Input Timezone** to `UTC`
5. Set **Output Format** to `dd-mm-yyyy hhh:ii:ss`
6. Set **Output Timezone** to `America/Los_Angeles`
7. Give your **Output field** a name and click **Save**. The format of the dates in your input field will be transformed. For example:

<pre><code><strong>2023-06-15 14:30:00 -> 15-06-2023 07:30:00
</strong></code></pre>

{% hint style="info" %}
You can try out operations with specific values using the **Input** field above the operation. You can enter the value in the example above and check the result in the **Output** field.
{% endhint %}


---

# Agent Instructions: 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/field-transformation/field-transformation-operations/date-time/translate-datetime-nites-format.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.
