# Date Histogram bucket boundaries

**URL:** <https://discuss.elastic.co/t/date-histogram-bucket-boundaries/345301>\
**Category:** Elasticsearch\
**Created:** [October 18, 2023, 2:36pm UTC](https://discuss.elastic.co/t/date-histogram-bucket-boundaries/345301 "2023-10-18T14:36:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![arunachala](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/arunachala/32/126762_2.png) [@arunachala](https://discuss.elastic.co/u/arunachala)\
**Post date:** [October 18, 2023, 2:36pm UTC](https://discuss.elastic.co/t/date-histogram-bucket-boundaries/345301/1 "2023-10-18T14:36:03Z")

</div>

Hi,

I understand that the bucket boundaries for date\_histogram are calculated with respect to epoch time. Is there any option to change this to a specific time?

I am trying to achieve similar results as what some of databases provide like below

> **[Functions for Working with Dates and Times | ClickHouse Docs](https://clickhouse.com/docs/en/sql-reference/functions/date-time-functions#:~:text=The%20calculation%20is%20performed%20relative%20to%20specific%20points%20in%20time%3A)**
>
> Most functions in this section accept an optional time zone argument, e.g. Europe/Amsterdam. In this case, the time zone is the specified one instead of the local (default) one.

[Timescale Docs](https://docs.timescale.com/api/latest/hyperfunctions/time_bucket/#:~:text=Defaults%20to%20midnight%20on%20January%203%2C%202000%2C%20for%20buckets%20that%20don%27t%20include%20a%20month%20or%20year%20interval%2C%20and%20to%20midnight%20on%20January%201%2C%202000%2C%20for%20month%2C%20year%2C%20and%20century%20buckets).

Regards,  
Arun

---

<div class="post-metadata">

**Author:** ![arunachala](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/arunachala/32/126762_2.png) [@arunachala](https://discuss.elastic.co/u/arunachala)\
**Post date:** [October 23, 2023, 11:18am UTC](https://discuss.elastic.co/t/date-histogram-bucket-boundaries/345301/2 "2023-10-23T11:18:35Z")

</div>

Hi All,  
Any responses here?

-Arun

---

<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:** [November 20, 2023, 11:18am UTC](https://discuss.elastic.co/t/date-histogram-bucket-boundaries/345301/3 "2023-11-20T11:18:36Z")

</div>

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