# Date Histogram - Day of Week aggregation

**URL:** <https://discuss.elastic.co/t/date-histogram-day-of-week-aggregation/81740>\
**Category:** Elasticsearch\
**Created:** [April 10, 2017, 4:08am UTC](https://discuss.elastic.co/t/date-histogram-day-of-week-aggregation/81740 "2017-04-10T04:08:20Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![Paulo\_Henrique\_PH](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/paulo_henrique_ph/32/14831_2.png) [@Paulo\_Henrique\_PH](https://discuss.elastic.co/u/Paulo_Henrique_PH)\
**Post date:** [April 11, 2017, 7:21am UTC](https://discuss.elastic.co/t/date-histogram-day-of-week-aggregation/81740/5 "2017-04-11T07:21:40Z")

</div>

Hi @spinscale  
Thanks for the reply.

Only if we index all the time zone available... not feasible in this scenario.  
We've got it up running for other date formats (year, month and year etc)

I've tried this approach here:

> [@Day of Week aggregation with TimeZone](https://discuss.elastic.co/t/day-of-week-aggregation-with-timezone/81924):
>
> I use ES 5.1.2 and I'm trying to compute day of week and time of day from a date field and consider timezone at the same time. my first script is def d = doc['my\_field'].date; d.addHours(10); d.getDayOfWeek(); The error message is can't find addHours() method "caused\_by": { "type": "illegal\_argument\_exception", "reason": "Unable to find dynamic method [addHours] with [1] arguments for class [org.joda.time.MutableDateTime]." }, "script\_stack": [ "d.addHours(10); ", " ^---- HERE…

No luck unforcefully...

---

_[View the full topic](https://discuss.elastic.co/t/date-histogram-day-of-week-aggregation/81740)._
