# How to add timestamp and search old data

**URL:** <https://discuss.elastic.co/t/how-to-add-timestamp-and-search-old-data/143468>\
**Category:** Elasticsearch\
**Created:** [August 8, 2018, 9:39am UTC](https://discuss.elastic.co/t/how-to-add-timestamp-and-search-old-data/143468 "2018-08-08T09:39:02Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![agrawal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/agrawal/32/33850_2.png) [@agrawal](https://discuss.elastic.co/u/agrawal)\
**Post date:** [August 8, 2018, 9:39am UTC](https://discuss.elastic.co/t/how-to-add-timestamp-and-search-old-data/143468/1 "2018-08-08T09:39:02Z")

</div>

1. How to add current timestamp while indexing the data.  
Code:

In the above code, How to define/add current timestamp while indexing.

---

<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 5, 2018, 9:39am UTC](https://discuss.elastic.co/t/how-to-add-timestamp-and-search-old-data/143468/2 "2018-09-05T09:39:02Z")

</div>

Closed on September 5, 2018, 9:39am UTC

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