# Lucene @timestamp rounding question

**URL:** <https://discuss.elastic.co/t/lucene-timestamp-rounding-question/115487>\
**Category:** Elasticsearch\
**Created:** [January 15, 2018, 7:19am UTC](https://discuss.elastic.co/t/lucene-timestamp-rounding-question/115487 "2018-01-15T07:19:49Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![albeniz71](https://avatars.discourse-cdn.com/v4/letter/a/ee7513/32.png) [@albeniz71](https://discuss.elastic.co/u/albeniz71)\
**Post date:** [January 15, 2018, 7:19am UTC](https://discuss.elastic.co/t/lucene-timestamp-rounding-question/115487/1 "2018-01-15T07:19:49Z")

</div>

I am trying to retrive total count of todays requests.  
To do this, the beginning of time span sould 'today 00:00:00' and the end of time span sould 'now'.  
How can I specify these 2 values in lucene syntanx query box of discovery page ?  
I've tried several times like '@timestamp:[NOW/DAY TO NOW]'.. and so on. It didn't work.

Please Help !!

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [January 15, 2018, 7:33am UTC](https://discuss.elastic.co/t/lucene-timestamp-rounding-question/115487/2 "2018-01-15T07:33:29Z")

</div>

It should be probably something like: `@timestamp:[now/d TO now]` I believe.

---

<div class="post-metadata">

**Author:** ![albeniz71](https://avatars.discourse-cdn.com/v4/letter/a/ee7513/32.png) [@albeniz71](https://discuss.elastic.co/u/albeniz71)\
**Post date:** [January 15, 2018, 7:51am UTC](https://discuss.elastic.co/t/lucene-timestamp-rounding-question/115487/3 "2018-01-15T07:51:48Z")

</div>

> [@dadoonet](#):
>
> @timestamp:[now/d TO now]

Oh my god ! It works. Really thank you sir !

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [January 15, 2018, 8:40am UTC](https://discuss.elastic.co/t/lucene-timestamp-rounding-question/115487/4 "2018-01-15T08:40:42Z")

</div>

But note that it's definitely better to use something like `@timestamp:[now/d TO now+1d/d]` as `now` won't really move so the cache usage will be better.

---

<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:** [February 12, 2018, 8:40am UTC](https://discuss.elastic.co/t/lucene-timestamp-rounding-question/115487/5 "2018-02-12T08:40:42Z")

</div>

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