# InsertWallclockDateTimePart

{% hint style="success" %}
Use [InsertWallclockHeaders ](/latest/connectors/single-message-transforms/insertwallclockheaders.md)SMT if you want to use more than one date time part. This avoids multiple SMTs and is more efficient.&#x20;

For example, if you want to partition the data by **`yyyy-MM-dd/HH`**, then you can use **`InsertWallclockHeaders`** which inserts multiple headers: date, year, month, day, hour, minute, second.
{% endhint %}

## Transform Type Class

```
io.lenses.connect.smt.header.InsertWallclockDateTimePart
```

## Configuration

<table><thead><tr><th width="194">Name</th><th width="132">Description</th><th>Type</th><th width="66">Default</th><th width="121">Valid Values</th><th>Importance</th></tr></thead><tbody><tr><td><code>header.name</code></td><td>The name of the header to insert the timestamp into.</td><td>String</td><td></td><td></td><td>High</td></tr><tr><td><code>date.time.part</code></td><td>The date time part to insert.</td><td>String</td><td></td><td>year, month, day, hour,minute, second</td><td>High</td></tr><tr><td><code>timezone</code></td><td>Sets the timezone. It can be any valid java timezone.</td><td>String</td><td>UTC</td><td></td><td>High</td></tr></tbody></table>

## Example

To store the year, use the following configuration:

```properties
transforms=InsertWallclockDateTimePart
transforms.InsertWallclockDateTimePart.type=io.lenses.connect.smt.header.InsertWallclockDateTimePart
transforms.InsertWallclockDateTimePart.header.name=wallclock
transforms.InsertWallclockDateTimePart.date.time.part=year
```

To store the month, use the following configuration:

```properties
transforms=InsertWallclockDateTimePart
transforms.InsertWallclockDateTimePart.type=io.lenses.connect.smt.header.InsertWallclockDateTimePart
transforms.InsertWallclockDateTimePart.header.name=wallclock
transforms.InsertWallclockDateTimePart.date.time.part=month
```

To store the day, use the following configuration:

```properties
transforms=InsertWallclockDateTimePart
transforms.InsertWallclockDateTimePart.type=io.lenses.connect.smt.header.InsertWallclockDateTimePart
transforms.InsertWallclockDateTimePart.header.name=wallclock
transforms.InsertWallclockDateTimePart.date.time.part=day
```

To store the hour, use the following configuration:

```properties
transforms=InsertWallclockDateTimePart
transforms.InsertWallclockDateTimePart.type=io.lenses.connect.smt.header.InsertWallclockDateTimePart
transforms.InsertWallclockDateTimePart.header.name=wallclock
transforms.InsertWallclockDateTimePart.date.time.part=hour
```

To store the hour, and apply a timezone, use the following configuration:

```properties
transforms=InsertWallclockDateTimePart
transforms.InsertWallclockDateTimePart.type=io.lenses.connect.smt.header.InsertWallclockDateTimePart
transforms.InsertWallclockDateTimePart.header.name=wallclock
transforms.InsertWallclockDateTimePart.date.time.part=hour
transforms.InsertWallclockDateTimePart.timezone=Asia/Kolkata
```

To store the minute, use the following configuration:

```properties
transforms=InsertWallclockDateTimePart
transforms.InsertWallclockDateTimePart.type=io.lenses.connect.smt.header.InsertWallclockDateTimePart
transforms.InsertWallclockDateTimePart.header.name=wallclock
transforms.InsertWallclockDateTimePart.date.time.part=minute
```

To store the second, use the following configuration:

```properties
transforms=InsertWallclockDateTimePart
transforms.InsertWallclockDateTimePart.type=io.lenses.connect.smt.header.InsertWallclockDateTimePart
transforms.InsertWallclockDateTimePart.header.name=wallclock
transforms.InsertWallclockDateTimePart.date.time.part=second
```


---

# 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.lenses.io/latest/connectors/single-message-transforms/insertwallclockdatetimepart.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.
