> ## Documentation Index
> Fetch the complete documentation index at: https://www.integrate.io/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# ETL: Date Time Converter

> How to use the Date Time Converter guided form in the Expression Editor to build date and time conversion expressions without writing them by hand.

The Date Time Converter is a guided form in the [Expression Editor](/docs/etl/using-expressions-in-integrateio-etl/) that builds a date/time conversion expression for you. Instead of writing functions like [ToDateCustomFormats](/docs/etl/todatecustomformats/), [ToString](/docs/etl/tostring/), [ToDate](/docs/etl/todate/), and [ToUnixTime](/docs/etl/tounixtime/) by hand, you pick a source field, an input format, an output format, and an output type, and the editor generates the expression.

## Opening the Date Time Converter

Open the Expression Editor on any field (for example in a Select or Filter component). In the function list, find **DateTimeConverter** under the **Datetime** category and click it to open the guided form. When you select a date function such as [ToDate](/docs/etl/todate/) or [ToDateCustomFormats](/docs/etl/todatecustomformats/), the editor also shows a tip linking you to the Date Time Converter.

## Configuring the conversion

The form has four inputs and a live preview of the generated expression.

### Source Field

Select the field that holds the date/time value you want to convert. The dropdown lists the fields in the component's input schema. If you do not select a field, the generated expression uses a `'your_value_here'` placeholder that you can replace.

### Input Format

Choose the format your source data is already in. Presets cover the common cases:

| Preset            | Pattern                        | Example                  |
| ----------------- | ------------------------------ | ------------------------ |
| ISO Date          | `yyyy-MM-dd`                   | 2025-01-15               |
| US Date           | `MM/dd/yyyy`                   | 01/15/2025               |
| EU Date           | `dd/MM/yyyy`                   | 15/01/2025               |
| US Date Hyphen    | `MM-dd-yyyy`                   | 01-15-2025               |
| Verbose Date      | `dd-MMM-yyyy`                  | 15-Jan-2025              |
| Compact Date      | `yyyyMMdd`                     | 20250115                 |
| Database DateTime | `yyyy-MM-dd HH:mm:ss`          | 2025-01-15 14:30:00      |
| DateTime Minutes  | `yyyy-MM-dd HH:mm`             | 2025-01-15 14:30         |
| US DateTime       | `MM/dd/yyyy HH:mm:ss`          | 01/15/2025 14:30:00      |
| ISO 8601          | `yyyy-MM-dd'T'HH:mm:ss'Z'`     | 2025-01-15T14:30:00Z     |
| ISO 8601 Millis   | `yyyy-MM-dd'T'HH:mm:ss.SSS'Z'` | 2025-01-15T14:30:00.123Z |
| Unix Timestamp    | (seconds since epoch)          | 1736956200               |
| Custom...         | (your own pattern)             |                          |

Pick **Custom...** to type your own pattern. A format reference table appears showing the available tokens.

### Output Format

Choose the format to write the value out in. The output format presets are the same as the input presets, without the Unix Timestamp option.

The Output Format is only used when the Output Type is **String**. For **DateTime** and **Unix Timestamp** output, the field is disabled.

### Output Type

Choose what the expression should produce:

* **DateTime** parses the source value into a DateTime field.
* **String** parses the source value, then formats it as text using the Output Format.
* **Unix Timestamp** parses the source value and returns the number of seconds since the Unix epoch.

## Generated expressions

The form builds the expression from your selections. The patterns are:

| Output Type    | Standard input                                                  | Unix Timestamp input                           |
| -------------- | --------------------------------------------------------------- | ---------------------------------------------- |
| String         | `ToString(ToDateCustomFormats(field, 'inFormat'), 'outFormat')` | `ToString(ToDate(field * 1000L), 'outFormat')` |
| DateTime       | `ToDateCustomFormats(field, 'inFormat')`                        | `ToDate(field * 1000L)`                        |
| Unix Timestamp | `ToUnixTime(ToDateCustomFormats(field, 'inFormat'))`            | `field` (no conversion)                        |

For example, converting an ISO date field to US date string format produces:

```
ToString(ToDateCustomFormats(order_date, 'yyyy-MM-dd'), 'MM/dd/yyyy')
```

The **Preview** line shows a worked example of the conversion (for instance `2025-01-15 -> 01/15/2025`) so you can confirm the result before inserting it.

Click **Insert Expression** to add the generated expression to the Expression Editor.

## Custom format tokens

When you choose a custom input or output format, use these tokens to build the pattern:

| Token  | Meaning             | Example |
| ------ | ------------------- | ------- |
| `yyyy` | 4-digit year        | 2025    |
| `yy`   | 2-digit year        | 25      |
| `MM`   | Month (zero-padded) | 01      |
| `MMM`  | Month abbreviation  | Jan     |
| `dd`   | Day (zero-padded)   | 15      |
| `HH`   | Hour, 24-hour       | 14      |
| `hh`   | Hour, 12-hour       | 02      |
| `mm`   | Minutes             | 30      |
| `ss`   | Seconds             | 45      |
| `SSS`  | Milliseconds        | 123     |
| `a`    | AM/PM               | PM      |

<Note>
  The Date Time Converter is a shortcut for building expressions from the functions above. The result is a normal expression, so you can edit it after inserting it or combine it with other functions. To learn more about temporal data in Integrate.io ETL, see [Working with Datetime Data](/docs/etl/how-do-i-work-with-datetime-data/).
</Note>
