# Current timestamp in Kibana Dev Tools

**URL:** <https://discuss.elastic.co/t/current-timestamp-in-kibana-dev-tools/281247>\
**Category:** Kibana\
**Created:** [August 12, 2021, 6:57pm UTC](https://discuss.elastic.co/t/current-timestamp-in-kibana-dev-tools/281247 "2021-08-12T18:57:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Luca\_Frost](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/luca_frost/32/70254_2.png) [@Luca\_Frost](https://discuss.elastic.co/u/Luca_Frost)\
**Post date:** [August 12, 2021, 6:57pm UTC](https://discuss.elastic.co/t/current-timestamp-in-kibana-dev-tools/281247/1 "2021-08-12T18:57:32Z")

</div>

Hi All,

Apologies if this question has already been answered. Is it possible to create a new document using the Kibana Dev Console and set the timestamp field to now, much in the same way as datetime.now() in python.

```auto
POST index_name/_doc
{
    "field1": "some text",
    "timestamp": datetime.now() # I know this is python but bear with me for explanation purposes
}

```

Any help would be greatly appreciated! Thanks 🙂

---

<div class="post-metadata">

**Author:** ![Marta\_Bondyra](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marta_bondyra/32/102122_2.png) [@Marta\_Bondyra](https://discuss.elastic.co/u/Marta_Bondyra)\
**Post date:** [August 13, 2021, 11:43am UTC](https://discuss.elastic.co/t/current-timestamp-in-kibana-dev-tools/281247/2 "2021-08-13T11:43:13Z")

</div>

Hi there, I think you can use a custom ingest pipeline to achieve it.  
In the console, create your pipeline:

```auto
PUT _ingest/pipeline/add_timestamp
{
  "description": "Adds timestamp",
  "processors": [
    {
      "set": {
        "field": "_source.timestamp",
        "value": "{{_ingest.timestamp}}"
      }
    }
  ]
}

```

Then, create your index in the console along with a setting `default_pipeline`:

```auto
PUT indexName/_settings
{
  "index": {
    "default_pipeline": "add_timestamp"
  }
}

```

Now every document will receive a timestamp.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [September 10, 2021, 11:44am UTC](https://discuss.elastic.co/t/current-timestamp-in-kibana-dev-tools/281247/3 "2021-09-10T11:44:04Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
