# Is there a way to specify now as the value of a time field

**URL:** <https://discuss.elastic.co/t/is-there-a-way-to-specify-now-as-the-value-of-a-time-field/37048>\
**Category:** Elasticsearch\
**Created:** [December 13, 2015, 2:10am UTC](https://discuss.elastic.co/t/is-there-a-way-to-specify-now-as-the-value-of-a-time-field/37048 "2015-12-13T02:10:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ramesh](https://avatars.discourse-cdn.com/v4/letter/r/d07c76/32.png) [@ramesh](https://discuss.elastic.co/u/ramesh)\
**Post date:** [December 13, 2015, 2:10am UTC](https://discuss.elastic.co/t/is-there-a-way-to-specify-now-as-the-value-of-a-time-field/37048/1 "2015-12-13T02:10:42Z")

</div>

We have a usecase where active documents are stored and the duration of them being active is the difference between now and when they were created. Is there any way we can achieve in elasticsearch?

---

<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:** [July 5, 2017, 11:31pm UTC](https://discuss.elastic.co/t/is-there-a-way-to-specify-now-as-the-value-of-a-time-field/37048/2 "2017-07-05T23:31:30Z")

</div>


