# Date Mapping Format Not Working

**URL:** <https://discuss.elastic.co/t/date-mapping-format-not-working/62216>\
**Category:** Elasticsearch\
**Created:** [October 4, 2016, 8:04pm UTC](https://discuss.elastic.co/t/date-mapping-format-not-working/62216 "2016-10-04T20:04:35Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![chromechris](https://avatars.discourse-cdn.com/v4/letter/c/e47c2d/32.png) [@chromechris](https://discuss.elastic.co/u/chromechris)\
**Post date:** [October 4, 2016, 8:04pm UTC](https://discuss.elastic.co/t/date-mapping-format-not-working/62216/1 "2016-10-04T20:04:35Z")

</div>

Hello guys,

I have used a timestamp the comes from Logstash looking like this:  
2016-09-30 02:45:22,533-0700

In mappings I have set it as:  
"timestamp": {  
"type": "date",  
"format": "yyyy-MM-dd HH:mm:ss,SSSZ"  
}

However in the alias/index, the timestamp appears a string type. I have a previous index in the alias with the timestamp set as a string, but I created a new index with the timestamp as a date type with the above format mentioned. My new index is working fine, but the new Date Format on the "timestamp" field does not seem to change?

---

<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:** [October 6, 2016, 5:27am UTC](https://discuss.elastic.co/t/date-mapping-format-not-working/62216/2 "2016-10-06T05:27:25Z")

</div>

Can you show us the mappings?

---

<div class="post-metadata">

**Author:** ![Meenal.Luktuke](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/meenal.luktuke/32/7795_2.png) [@Meenal.Luktuke](https://discuss.elastic.co/u/Meenal.Luktuke)\
**Post date:** [October 6, 2016, 7:19am UTC](https://discuss.elastic.co/t/date-mapping-format-not-working/62216/3 "2016-10-06T07:19:10Z")

</div>

Can you also share your logstash config file along with ES mapping?

---

<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 5, 2017, 10:14pm UTC](https://discuss.elastic.co/t/date-mapping-format-not-working/62216/4 "2017-07-05T22:14:27Z")

</div>


