# Rewrite Timestamp

### Description

The Rewrite Timestamp processor can be used to write the value from the Time field of a telemetry entry into a string value.

### Supported Types

| Metrics | Logs | Traces |
| ------- | ---- | ------ |
| ✓       | ✓    | ✓      |

### Configuration

<table><thead><tr><th width="193.99609375">Field</th><th>Description</th></tr></thead><tbody><tr><td>Condition</td><td>A condition that determines when this processor is applied.</td></tr><tr><td>Target Field Type</td><td>The telemetry field type where the newly formatted timestamp will be placed.</td></tr><tr><td>Target Field</td><td>The target field to place the result into. May only be blank if Body is selected for the Target Field Type.</td></tr><tr><td>Timestamp Format</td><td>The ctime variable based timestamp format to write.</td></tr></tbody></table>

### Example Configuration(s)

Rewriting the timestamp of a syslog message that has first been parsed using regex, and the timestamp value parsed into the Time field.

**Processors**

This processor is frequently part of a chain that involves parsing the original message, parsing the timestamp into the Time field, rewriting that timestamp from the Time field back into a string, and then concatenating the parsed strings back together.

<figure><img src="https://1405008107-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgmiOMzBfoNFwmKJFHMcJ%2Fuploads%2F4MzFszTNkIZYSfJYowQD%2FProcessors-Fin.png?alt=media&#x26;token=ca9ba4cf-e49b-43d9-ba5e-5a4edc8bc201" alt=""><figcaption></figcaption></figure>

**Attributes created by the processors above**

The `new_ts` field is what was created by the rewrite.

<figure><img src="https://1405008107-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgmiOMzBfoNFwmKJFHMcJ%2Fuploads%2FaiCa78fl6ypKAsHokEhb%2FAttributes-Fin.png?alt=media&#x26;token=6427eedc-d9b0-4d93-8cd7-8b797d9582f7" alt=""><figcaption></figcaption></figure>

**Rewrite Timestamp Processor Config**

<figure><img src="https://1405008107-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FgmiOMzBfoNFwmKJFHMcJ%2Fuploads%2FFrS22mRGJj2iA35eCWrQ%2FRewrite%20Timestamp-Fin.png?alt=media&#x26;token=5c2ea8c2-8d82-4cb6-8154-dd69617454c0" alt=""><figcaption></figcaption></figure>


---

# 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.bindplane.com/integrations/processors/rewrite-timestamp.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.
