# What will be mapping format for date?

**URL:** <https://discuss.elastic.co/t/what-will-be-mapping-format-for-date/177227>\
**Category:** Elasticsearch\
**Created:** [April 17, 2019, 8:16am UTC](https://discuss.elastic.co/t/what-will-be-mapping-format-for-date/177227 "2019-04-17T08:16:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ankita\_Ghosh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ankita_ghosh/32/42607_2.png) [@Ankita\_Ghosh](https://discuss.elastic.co/u/Ankita_Ghosh)\
**Post date:** [April 17, 2019, 8:16am UTC](https://discuss.elastic.co/t/what-will-be-mapping-format-for-date/177227/1 "2019-04-17T08:16:43Z")

</div>

2018-08-23 06:39:53.821362+00

for this format I am creating mapping  
"date": {  
"type": "date",  
"format" : "yyyy-MM-dd hh:mm:ss.SSSSSS+00"  
}

giving format exception

---

<div class="post-metadata">

**Author:** ![HenningAndersen](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/henningandersen/32/48188_2.png) [@HenningAndersen](https://discuss.elastic.co/u/HenningAndersen)\
**Post date:** [April 17, 2019, 2:47pm UTC](https://discuss.elastic.co/t/what-will-be-mapping-format-for-date/177227/2 "2019-04-17T14:47:18Z")

</div>

Hi @Ankita_Ghosh,

this seems to work for me on 6.7, which version are you on?

The +00 is a timezone offset and it could be beneficial to use Z in the format instead to signal that it is the timezone, I believe having +00 in the format will simply be a required constant.

---

<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:** [May 15, 2019, 2:47pm UTC](https://discuss.elastic.co/t/what-will-be-mapping-format-for-date/177227/3 "2019-05-15T14:47:22Z")

</div>

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