# Datehistogram returning key\_as\_string in different formats between different clusters?

**URL:** <https://discuss.elastic.co/t/datehistogram-returning-key-as-string-in-different-formats-between-different-clusters/109470>\
**Category:** Elasticsearch\
**Created:** [November 28, 2017, 8:38pm UTC](https://discuss.elastic.co/t/datehistogram-returning-key-as-string-in-different-formats-between-different-clusters/109470 "2017-11-28T20:38:02Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![esmattdawson](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/esmattdawson/32/51404_2.png) [@esmattdawson](https://discuss.elastic.co/u/esmattdawson)\
**Post date:** [November 28, 2017, 8:38pm UTC](https://discuss.elastic.co/t/datehistogram-returning-key-as-string-in-different-formats-between-different-clusters/109470/1 "2017-11-28T20:38:03Z")

</div>

ES version 5.6.3 / 5.6.4  
I have an index with a date field of format "strict\_date\_time\_no\_millis||strict\_date\_time"  
When I do a date histogram in 5.6.4 it returns the key\_as\_string using strict\_date\_time\_no\_millis format, when I query 5.6.3 it returns it in strict\_date\_time format.  
How is the format chosen for the key\_as\_string?  
Is it possible the formats are in a map and it's random on server startup as to which format is chosen?  
Or was there a change in 5.6.4. I didn't see anything in the changelog for it.

I'm going to try an upgrade of 5.6.3 -\> 5.6.4 now, I'm just wondering if there was a change, or whether this will be a random issue?

Edit:  
Upgraded to 5.6.4 and I still have the same issue.  
One machine is running Windows 10 and the other Ubuntu, maybe that could be a difference.

---

<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:** [December 26, 2017, 8:38pm UTC](https://discuss.elastic.co/t/datehistogram-returning-key-as-string-in-different-formats-between-different-clusters/109470/2 "2017-12-26T20:38:26Z")

</div>

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