# Date format on Logstash

**URL:** <https://discuss.elastic.co/t/date-format-on-logstash/38364>\
**Category:** Logstash\
**Created:** [January 5, 2016, 4:06am UTC](https://discuss.elastic.co/t/date-format-on-logstash/38364 "2016-01-05T04:06:47Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![tatdat](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tatdat/32/113160_2.png) [@tatdat](https://discuss.elastic.co/u/tatdat)\
**Post date:** [January 5, 2016, 4:06am UTC](https://discuss.elastic.co/t/date-format-on-logstash/38364/1 "2016-01-05T04:06:47Z")

</div>

I using logstash 2.1.1 and i create format indices on Output Elasticsearch with config  
[![](http://imagizer.imageshack.us/a/img908/3070/HNdP7L.png) ](http://imagizer.imageshack.us/a/img908/3070/HNdP7L.png)

Before i using format "Name-Indices-YYYY-MM-dd", now i change to weekly format (above image)  
"Name-Indices-GGGG-WW"  
but i got error

[![](http://imagizer.imageshack.us/a/img908/589/LPXaEE.png) ](http://imagizer.imageshack.us/a/img908/589/LPXaEE.png)

What wrong with date format ??  
Thank you

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [January 5, 2016, 4:21am UTC](https://discuss.elastic.co/t/date-format-on-logstash/38364/2 "2016-01-05T04:21:27Z")

</div>

It's much easier if you copy and paste the text, rather than forcing people to read images with small text.

However, per [the docs](https://www.elastic.co/guide/en/logstash/2.1/plugins-outputs-elasticsearch.html#plugins-outputs-elasticsearch-index);

> For weekly indexes ISO 8601 format is recommended, eg. logstash-%{+xxxx.ww}.

---

<div class="post-metadata">

**Author:** ![tatdat](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tatdat/32/113160_2.png) [@tatdat](https://discuss.elastic.co/u/tatdat)\
**Post date:** [January 5, 2016, 8:10am UTC](https://discuss.elastic.co/t/date-format-on-logstash/38364/3 "2016-01-05T08:10:27Z")

</div>

Thank for support.  
I will attention next time.

---

<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, 5:16am UTC](https://discuss.elastic.co/t/date-format-on-logstash/38364/4 "2017-07-06T05:16:48Z")

</div>


