# Elastic Search Timestamp format

**URL:** <https://discuss.elastic.co/t/elastic-search-timestamp-format/110199>\
**Category:** Elasticsearch\
**Created:** [December 4, 2017, 6:36pm UTC](https://discuss.elastic.co/t/elastic-search-timestamp-format/110199 "2017-12-04T18:36:21Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![jakelaws](https://avatars.discourse-cdn.com/v4/letter/j/a698b9/32.png) [@jakelaws](https://discuss.elastic.co/u/jakelaws)\
**Post date:** [December 4, 2017, 6:36pm UTC](https://discuss.elastic.co/t/elastic-search-timestamp-format/110199/1 "2017-12-04T18:36:21Z")

</div>

Hi,

I am currently have NiFi ingesting data into our elastic search environment. We are trying to get elastic to recognize the timestamp format '2017-12-04 18:25:30.114000+00:00' but no matter what we have tried it fails and throws the error of illegal argument exception, invalid format. Please advise on how we can get Elastic to recognize this format.

Thank you.

---

<div class="post-metadata">

**Author:** ![rjernst](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rjernst/32/6363_2.png) [@rjernst](https://discuss.elastic.co/u/rjernst)\
**Post date:** [December 4, 2017, 7:13pm UTC](https://discuss.elastic.co/t/elastic-search-timestamp-format/110199/2 "2017-12-04T19:13:52Z")

</div>

Can you show which format strings you have tried and what method you have used to setup the field with that format?

---

<div class="post-metadata">

**Author:** ![jakelaws](https://avatars.discourse-cdn.com/v4/letter/j/a698b9/32.png) [@jakelaws](https://discuss.elastic.co/u/jakelaws)\
**Post date:** [December 4, 2017, 8:20pm UTC](https://discuss.elastic.co/t/elastic-search-timestamp-format/110199/3 "2017-12-04T20:20:19Z")

</div>

I tried pushing in the data and creating a new index and seeing if it recognized a time-based field, which it did not.

I also tried preformatting  
PUT {index}  
{  
"mappings": {  
"{typeName}": {  
"properties": {  
"{fieldName}" : {  
"type": "date",  
"format": "yyyy-MM-dd HH:mm:ss.SSSSSSZZ"  
}  
}  
}  
}  
}

also tried format: strict\_date\_optional\_time

---

<div class="post-metadata">

**Author:** ![rjernst](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rjernst/32/6363_2.png) [@rjernst](https://discuss.elastic.co/u/rjernst)\
**Post date:** [December 4, 2017, 8:54pm UTC](https://discuss.elastic.co/t/elastic-search-timestamp-format/110199/4 "2017-12-04T20:54:02Z")

</div>

What do you mean by "it did not"? Did you get a specific error when creating the index?

---

<div class="post-metadata">

**Author:** ![jakelaws](https://avatars.discourse-cdn.com/v4/letter/j/a698b9/32.png) [@jakelaws](https://discuss.elastic.co/u/jakelaws)\
**Post date:** [December 4, 2017, 9:08pm UTC](https://discuss.elastic.co/t/elastic-search-timestamp-format/110199/5 "2017-12-04T21:08:41Z")

</div>

No, when selecting "Index contains time-based events" and then trying to select a drop down of fields, it does not recognize any field is a time-based field. Although the data has time field with the time format specified above.

---

<div class="post-metadata">

**Author:** ![rjernst](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rjernst/32/6363_2.png) [@rjernst](https://discuss.elastic.co/u/rjernst)\
**Post date:** [December 4, 2017, 9:39pm UTC](https://discuss.elastic.co/t/elastic-search-timestamp-format/110199/6 "2017-12-04T21:39:15Z")

</div>

You seem to be referring to a UI. Maybe Kibana? I would suggest asking this in the [Kibana discuss forum](https://discuss.elastic.co/c/kibana) since in this one we really only know the direct elasticsearch API.

---

<div class="post-metadata">

**Author:** ![jakelaws](https://avatars.discourse-cdn.com/v4/letter/j/a698b9/32.png) [@jakelaws](https://discuss.elastic.co/u/jakelaws)\
**Post date:** [December 5, 2017, 1:59pm UTC](https://discuss.elastic.co/t/elastic-search-timestamp-format/110199/7 "2017-12-05T13:59:06Z")

</div>

Makes sense, I just figured it may be this one since the NiFi PutElasticSearch is rejecting the data insert. I will post in that discussion form, thank you for the guidance.

---

<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:** [January 2, 2018, 1:59pm UTC](https://discuss.elastic.co/t/elastic-search-timestamp-format/110199/8 "2018-01-02T13:59:19Z")

</div>

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