# Disabling dynamic date time formatting in python api or globally

**URL:** <https://discuss.elastic.co/t/disabling-dynamic-date-time-formatting-in-python-api-or-globally/22175>\
**Category:** Elasticsearch\
**Created:** [February 15, 2015, 1:44pm UTC](https://discuss.elastic.co/t/disabling-dynamic-date-time-formatting-in-python-api-or-globally/22175 "2015-02-15T13:44:09Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shahid\_Qadri](https://avatars.discourse-cdn.com/v4/letter/s/f17d59/32.png) [@Shahid\_Qadri](https://discuss.elastic.co/u/Shahid_Qadri)\
**Post date:** [February 15, 2015, 1:44pm UTC](https://discuss.elastic.co/t/disabling-dynamic-date-time-formatting-in-python-api-or-globally/22175/1 "2015-02-15T13:44:09Z")

</div>

guys getting this error

```
raise HTTP_EXCEPTIONS.get(status_code, TransportError)(status_code, 

```

error\_message, additional\_info)  
RequestError: TransportError(400, u'MapperParsingException[failed to parse  
[SOURCES.DATE\_COMP]]; nested: MapperParsingException[failed to parse date  
field [--], tried both date format [dateOptionalTime], and timestamp number  
with locale []]; nested: IllegalArgumentException[Invalid format: "--"]; ')

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/b5c56a9a-edea-4006-a8f3-9b676b8f7b45%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/b5c56a9a-edea-4006-a8f3-9b676b8f7b45%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [February 15, 2015, 1:58pm UTC](https://discuss.elastic.co/t/disabling-dynamic-date-time-formatting-in-python-api-or-globally/22175/2 "2015-02-15T13:58:50Z")

</div>

Sounds like "--" is not a valid date.

--  
David 😉  
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

> Le 15 févr. 2015 à 14:44, Shahid Qadri [shahid@trialx.com](mailto:shahid@trialx.com) a écrit :
> 
> guys getting this error
> 
> ```
> raise HTTP_EXCEPTIONS.get(status_code, TransportError)(status_code, error_message, additional_info)
> 
> ```
> 
> ## RequestError: TransportError(400, u'MapperParsingException[failed to parse [SOURCES.DATE\_COMP]]; nested: MapperParsingException[failed to parse date field [--], tried both date format [dateOptionalTime], and timestamp number with locale ]; nested: IllegalArgumentException[Invalid format: "--"]; ')
> 
> You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/b5c56a9a-edea-4006-a8f3-9b676b8f7b45%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/b5c56a9a-edea-4006-a8f3-9b676b8f7b45%40googlegroups.com).  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/5F39E1DF-6044-446B-B5C2-ADC5E41F30E1%40pilato.fr](https://groups.google.com/d/msgid/elasticsearch/5F39E1DF-6044-446B-B5C2-ADC5E41F30E1%40pilato.fr).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Shahid\_Qadri](https://avatars.discourse-cdn.com/v4/letter/s/f17d59/32.png) [@Shahid\_Qadri](https://discuss.elastic.co/u/Shahid_Qadri)\
**Post date:** [February 15, 2015, 2:42pm UTC](https://discuss.elastic.co/t/disabling-dynamic-date-time-formatting-in-python-api-or-globally/22175/3 "2015-02-15T14:42:57Z")

</div>

i know i just want to disable automatic date conversion as my date strings  
are not in valid format(they can be empty as well)

On Sunday, February 15, 2015 at 7:29:59 PM UTC+5:30, David Pilato wrote:

> Sounds like "--" is not a valid date.
> 
> --  
> David 😉  
> Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> 
> Le 15 févr. 2015 à 14:44, Shahid Qadri \<[sha...@trialx.com](mailto:sha...@trialx.com) \<javascript:\>\>  
> a écrit :
> 
> guys getting this error
> 
> ```
> raise HTTP_EXCEPTIONS.get(status_code, TransportError)(status_code, 
> 
> ```
> 
> error\_message, additional\_info)  
> RequestError: TransportError(400, u'MapperParsingException[failed to parse  
> [SOURCES.DATE\_COMP]]; nested: MapperParsingException[failed to parse date  
> field [--], tried both date format [dateOptionalTime], and timestamp number  
> with locale ]; nested: IllegalArgumentException[Invalid format: "--"]; ')
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/b5c56a9a-edea-4006-a8f3-9b676b8f7b45%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/b5c56a9a-edea-4006-a8f3-9b676b8f7b45%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/b5c56a9a-edea-4006-a8f3-9b676b8f7b45%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/b5c56a9a-edea-4006-a8f3-9b676b8f7b45%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/982a26f7-fa99-45ce-a9cf-07b8f9ea86a7%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/982a26f7-fa99-45ce-a9cf-07b8f9ea86a7%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [February 15, 2015, 11:32pm UTC](https://discuss.elastic.co/t/disabling-dynamic-date-time-formatting-in-python-api-or-globally/22175/4 "2015-02-15T23:32:15Z")

</div>

Set the mapping for this field to be a string.  
[Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/mapping-core-types.html#string) [http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/mapping-core-types.html#string](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/mapping-core-types.html#string)

It won’t be converted as a date.

--  
David Pilato | Technical Advocate | [Elasticsearch.com](http://Elasticsearch.com)  
@dadoonet [https://twitter.com/dadoonet](https://twitter.com/dadoonet) | @elasticsearchfr [https://twitter.com/elasticsearchfr](https://twitter.com/elasticsearchfr) | @scrutmydocs [https://twitter.com/scrutmydocs](https://twitter.com/scrutmydocs)

> Le 15 févr. 2015 à 15:42, Shahid Qadri [shahid@trialx.com](mailto:shahid@trialx.com) a écrit :
> 
> i know i just want to disable automatic date conversion as my date strings are not in valid format(they can be empty as well)
> 
> On Sunday, February 15, 2015 at 7:29:59 PM UTC+5:30, David Pilato wrote:  
> Sounds like "--" is not a valid date.
> 
> --  
> David 😉  
> Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> 
> Le 15 févr. 2015 à 14:44, Shahid Qadri \<[sha...@trialx.com](mailto:sha...@trialx.com) \<javascript:\>\> a écrit :
> 
> > guys getting this error
> > 
> > ```
> > raise HTTP_EXCEPTIONS.get(status_code, TransportError)(status_code, error_message, additional_info)
> > 
> > ```
> > 
> > RequestError: TransportError(400, u'MapperParsingException[failed to parse [SOURCES.DATE\_COMP]]; nested: MapperParsingException[failed to parse date field [--], tried both date format [dateOptionalTime], and timestamp number with locale ]; nested: IllegalArgumentException[Invalid format: "--"]; ')
> > 
> > --  
> > You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/b5c56a9a-edea-4006-a8f3-9b676b8f7b45%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/b5c56a9a-edea-4006-a8f3-9b676b8f7b45%40googlegroups.com) [https://groups.google.com/d/msgid/elasticsearch/b5c56a9a-edea-4006-a8f3-9b676b8f7b45%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/b5c56a9a-edea-4006-a8f3-9b676b8f7b45%40googlegroups.com?utm_medium=email&utm_source=footer).  
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout) [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> 
> --  
> You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com) [mailto:elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/982a26f7-fa99-45ce-a9cf-07b8f9ea86a7%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/982a26f7-fa99-45ce-a9cf-07b8f9ea86a7%40googlegroups.com) [https://groups.google.com/d/msgid/elasticsearch/982a26f7-fa99-45ce-a9cf-07b8f9ea86a7%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/982a26f7-fa99-45ce-a9cf-07b8f9ea86a7%40googlegroups.com?utm_medium=email&utm_source=footer).  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout) [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/55B0B9AD-38B6-4625-972E-4B0438DFC899%40pilato.fr](https://groups.google.com/d/msgid/elasticsearch/55B0B9AD-38B6-4625-972E-4B0438DFC899%40pilato.fr).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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, 12:32am UTC](https://discuss.elastic.co/t/disabling-dynamic-date-time-formatting-in-python-api-or-globally/22175/5 "2017-07-06T00:32:39Z")

</div>


