# Date\_histogram on multiple fields

**URL:** https://discuss.elastic.co/t/date-histogram-on-multiple-fields/15958
**Category:** Elasticsearch
**Created:** [February 21, 2014, 9:53pm UTC](https://discuss.elastic.co/t/date-histogram-on-multiple-fields/15958 "2014-02-21T21:53:58Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![vinamar](https://avatars.discourse-cdn.com/v4/letter/v/35a633/32.png) [@vinamar](https://discuss.elastic.co/u/vinamar)
#### Post date: [February 21, 2014, 9:53pm UTC](https://discuss.elastic.co/t/date-histogram-on-multiple-fields/15958/1 "2014-02-21T21:53:58Z")

</div>

Hi,

We are making changes to schema to have a new index(w/ new schema) but still support old index (w/ old schema) for search.

We currently have date\_histogram computed on a date time field as given below.  
"date\_histogram": {  
"field": "closeDt",  
"interval": histo\_interval  
}

where closeDt is time in milliseconds and histo\_interval is week/month/hour interval range

With new schema also to be supported, the new schema has closeDt in a different json structure like  
cs.common.closeDt (also time in milliseconds).

how can we have the histogram computed on both the fields (w/ same data type) ?

Thanks, Vinoth

---

<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 6, 2017, 1:48am UTC](https://discuss.elastic.co/t/date-histogram-on-multiple-fields/15958/2 "2017-07-06T01:48:13Z")

</div>


