# Dynamic\_date\_format for the whole cluster

**URL:** https://discuss.elastic.co/t/dynamic-date-format-for-the-whole-cluster/8637
**Category:** Elasticsearch
**Created:** [August 5, 2012, 3:29am UTC](https://discuss.elastic.co/t/dynamic-date-format-for-the-whole-cluster/8637 "2012-08-05T03:29:42Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![anon48959148](https://avatars.discourse-cdn.com/v4/letter/a/71c47a/32.png) [@anon48959148](https://discuss.elastic.co/u/anon48959148)
#### Post date: [August 5, 2012, 3:29am UTC](https://discuss.elastic.co/t/dynamic-date-format-for-the-whole-cluster/8637/1 "2012-08-05T03:29:42Z")

</div>

I would like to add a date format using dynamic\_date\_format. The  
documentation[http://www.elasticsearch.org/guide/reference/mapping/root-object-type.html](http://www.elasticsearch.org/guide/reference/mapping/root-object-type.html)show how to do it for types, but is it possible to put this setting on the  
cluster so that all nodes will honor this date format?

I tried PUTting the following to [http://localhost:9200/\_cluster](http://localhost:9200/_cluster) and  
[http://localhost:9200/](http://localhost:9200/), but it does not seem to work:

> {  
> "dynamic\_date\_formats": "yyyy-MM-dd HH:mm:ss"  
> }

---

<div class="post-metadata">

### Author: ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)
#### Post date: [August 7, 2012, 10:02pm UTC](https://discuss.elastic.co/t/dynamic-date-format-for-the-whole-cluster/8637/2 "2012-08-07T22:02:48Z")

</div>

You can put a template that matches all indices, and in it have a mapping called _default_, where you configure the dynamic\_date\_formats. This means that for each index created the template will be matched, and the _default_ type mapping will be applied to all types within that index.

---

<div class="post-metadata">

### Author: ![anon48959148](https://avatars.discourse-cdn.com/v4/letter/a/71c47a/32.png) [@anon48959148](https://discuss.elastic.co/u/anon48959148)
#### Post date: [August 8, 2012, 12:07am UTC](https://discuss.elastic.co/t/dynamic-date-format-for-the-whole-cluster/8637/3 "2012-08-08T00:07:05Z")

</div>

Great idea! Thank you! 🙂

---

<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, 3:17am UTC](https://discuss.elastic.co/t/dynamic-date-format-for-the-whole-cluster/8637/4 "2017-07-06T03:17:19Z")

</div>


