# ElasticSearch mapping date RFC 2822

**URL:** https://discuss.elastic.co/t/elasticsearch-mapping-date-rfc-2822/13998
**Category:** Elasticsearch
**Created:** [October 17, 2013, 5:12pm UTC](https://discuss.elastic.co/t/elasticsearch-mapping-date-rfc-2822/13998 "2013-10-17T17:12:37Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Federico\_Garcia](https://avatars.discourse-cdn.com/v4/letter/f/8dc957/32.png) [@Federico\_Garcia](https://discuss.elastic.co/u/Federico_Garcia)
#### Post date: [October 17, 2013, 5:12pm UTC](https://discuss.elastic.co/t/elasticsearch-mapping-date-rfc-2822/13998/1 "2013-10-17T17:12:37Z")

</div>

Hi!

Original date RFC 2822: "Wed, 27 Mar 2013 15:12:14 +0000"

Mapping: "created\_at": {

```
                                "type": "date",

                                "format": "EEEE, dd MMM yyyy HH:mm:ss Z"

```

}

Elasticsearch index date as format string instead of date Elasticsearch  
produces an exception.

Caused by: org.elasticsearch.index.mapper.MapperParsingException: failed to  
parse date field [Thu, 17 Oct 2013 16:09:44 +0000], tried both date format  
[EEEE, dd MMM yyyy HH:mm:ss Z], and timestamp number with locale [null]

```
    at 

```

org.elasticsearch.index.mapper.core.DateFieldMapper.parseStringValue(DateFieldMapper.java:465)

```
    at 

```

org.elasticsearch.index.mapper.core.DateFieldMapper.innerParseCreateField(DateFieldMapper.java:413)

```
    at 

```

org.elasticsearch.index.mapper.core.NumberFieldMapper.parseCreateField(NumberFieldMapper.java:167)

```
    at 

```

org.elasticsearch.index.mapper.core.AbstractFieldMapper.parse(AbstractFieldMapper.java:385)

```
    ... 16 more

```

Caused by: java.lang.IllegalArgumentException: Invalid format: "Thu, 17 Oct  
2013 16:09:44 +0000"

```
    at 

```

org.elasticsearch.common.joda.time.format.DateTimeFormatter.parseMillis(DateTimeFormatter.java:752)

```
    at 

```

org.elasticsearch.index.mapper.core.DateFieldMapper.parseStringValue(DateFieldMapper.java:459)

```
    ... 19 more

```

Thanks!.

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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: [October 17, 2013, 5:22pm UTC](https://discuss.elastic.co/t/elasticsearch-mapping-date-rfc-2822/13998/2 "2013-10-17T17:22:30Z")

</div>

Try with EEE instead EEEE.

HTH

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

Le 17 oct. 2013 à 19:12, Federico García [federico@federicogarcia.es](mailto:federico@federicogarcia.es) a écrit :

Hi!  
Original date RFC 2822: "Wed, 27 Mar 2013 15:12:14 +0000"  
Mapping: "created\_at": {  
"type": "date",  
"format": "EEEE, dd MMM yyyy HH:mm:ss Z"  
}

Elasticsearch index date as format string instead of date Elasticsearch produces an exception.

Caused by: org.elasticsearch.index.mapper.MapperParsingException: failed to parse date field [Thu, 17 Oct 2013 16:09:44 +0000], tried both date format [EEEE, dd MMM yyyy HH:mm:ss Z], and timestamp number with locale [null]  
at org.elasticsearch.index.mapper.core.DateFieldMapper.parseStringValue(DateFieldMapper.java:465)  
at org.elasticsearch.index.mapper.core.DateFieldMapper.innerParseCreateField(DateFieldMapper.java:413)  
at org.elasticsearch.index.mapper.core.NumberFieldMapper.parseCreateField(NumberFieldMapper.java:167)  
at org.elasticsearch.index.mapper.core.AbstractFieldMapper.parse(AbstractFieldMapper.java:385)  
... 16 more  
Caused by: java.lang.IllegalArgumentException: Invalid format: "Thu, 17 Oct 2013 16:09:44 +0000"  
at org.elasticsearch.common.joda.time.format.DateTimeFormatter.parseMillis(DateTimeFormatter.java:752)  
at org.elasticsearch.index.mapper.core.DateFieldMapper.parseStringValue(DateFieldMapper.java:459)  
... 19 more

## Thanks!.

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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

### Author: ![Federico\_Garcia\_2](https://avatars.discourse-cdn.com/v4/letter/f/bc8723/32.png) [@Federico\_Garcia\_2](https://discuss.elastic.co/u/Federico_Garcia_2)
#### Post date: [October 17, 2013, 5:45pm UTC](https://discuss.elastic.co/t/elasticsearch-mapping-date-rfc-2822/13998/3 "2013-10-17T17:45:24Z")

</div>

Hi David:

Thanks for your quick response.

I've tried with EEE, fails with the following error.

org.elasticsearch.index.mapper.MapperParsingException: failed to parse  
[interaction.interaction.created\_at]  
at  
org.elasticsearch.index.mapper.core.AbstractFieldMapper.parse(AbstractFieldMapper.java:396)  
at  
org.elasticsearch.index.mapper.object.ObjectMapper.serializeValue(ObjectMapper.java:599)  
at  
org.elasticsearch.index.mapper.object.ObjectMapper.parse(ObjectMapper.java:467)  
at  
org.elasticsearch.index.mapper.object.ObjectMapper.serializeObject(ObjectMapper.java:515)  
at  
org.elasticsearch.index.mapper.object.ObjectMapper.parse(ObjectMapper.java:457)  
at  
org.elasticsearch.index.mapper.object.ObjectMapper.serializeObject(ObjectMapper.java:515)  
at  
org.elasticsearch.index.mapper.object.ObjectMapper.parse(ObjectMapper.java:457)  
at  
org.elasticsearch.index.mapper.DocumentMapper.parse(DocumentMapper.java:507)  
at  
org.elasticsearch.index.mapper.DocumentMapper.parse(DocumentMapper.java:451)  
at  
org.elasticsearch.index.shard.service.InternalIndexShard.prepareIndex(InternalIndexShard.java:329)  
at  
org.elasticsearch.action.bulk.TransportShardBulkAction.shardIndexOperation(TransportShardBulkAction.java:396)  
at  
org.elasticsearch.action.bulk.TransportShardBulkAction.shardOperationOnPrimary(TransportShardBulkAction.java:155)  
at  
org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction$AsyncShardOperationAction.performOnPrimary(TransportShardReplicationOperationAction.java:521)  
at  
org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction$AsyncShardOperationAction$1.run(TransportShardReplicationOperationAction.java:419)  
at  
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)  
at  
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)  
at java.lang.Thread.run(Thread.java:724)  
Caused by: org.elasticsearch.index.mapper.MapperParsingException: failed to  
parse date field [Thu, 17 Oct 2013 17:28:08 +0000], tried both date format  
[EEE, dd MMM yyyy HH:mm:ss Z], and timestamp number with locale [null]  
at  
org.elasticsearch.index.mapper.core.DateFieldMapper.parseStringValue(DateFieldMapper.java:465)  
at  
org.elasticsearch.index.mapper.core.DateFieldMapper.innerParseCreateField(DateFieldMapper.java:413)  
at  
org.elasticsearch.index.mapper.core.NumberFieldMapper.parseCreateField(NumberFieldMapper.java:167)  
at  
org.elasticsearch.index.mapper.core.AbstractFieldMapper.parse(AbstractFieldMapper.java:385)  
... 16 more  
Caused by: java.lang.IllegalArgumentException: Invalid format: "Thu, 17 Oct  
2013 17:28:08 +0000"  
at  
org.elasticsearch.common.joda.time.format.DateTimeFormatter.parseMillis(DateTimeFormatter.java:752)  
at  
org.elasticsearch.index.mapper.core.DateFieldMapper.parseStringValue(DateFieldMapper.java:459)  
... 19 more

Thanks.  
Federico.

El jueves, 17 de octubre de 2013 19:12:37 UTC+2, Federico García escribió:

> Hi!
> 
> Original date RFC 2822: "Wed, 27 Mar 2013 15:12:14 +0000"
> 
> Mapping: "created\_at": {
> 
> ```
> "type": "date",
> 
> "format": "EEEE, dd MMM yyyy HH:mm:ss 
> 
> ```
> 
> Z"
> 
> }
> 
> Elasticsearch index date as format string instead of date Elasticsearch  
> produces an exception.
> 
> Caused by: org.elasticsearch.index.mapper.MapperParsingException: failed  
> to parse date field [Thu, 17 Oct 2013 16:09:44 +0000], tried both date  
> format [EEEE, dd MMM yyyy HH:mm:ss Z], and timestamp number with locale  
> [null]
> 
> ```
> at 
> 
> ```
> 
> org.elasticsearch.index.mapper.core.DateFieldMapper.parseStringValue(DateFieldMapper.java:465)
> 
> ```
> at 
> 
> ```
> 
> org.elasticsearch.index.mapper.core.DateFieldMapper.innerParseCreateField(DateFieldMapper.java:413)
> 
> ```
> at 
> 
> ```
> 
> org.elasticsearch.index.mapper.core.NumberFieldMapper.parseCreateField(NumberFieldMapper.java:167)
> 
> ```
> at 
> 
> ```
> 
> org.elasticsearch.index.mapper.core.AbstractFieldMapper.parse(AbstractFieldMapper.java:385)
> 
> ```
> ... 16 more
> 
> ```
> 
> Caused by: java.lang.IllegalArgumentException: Invalid format: "Thu, 17  
> Oct 2013 16:09:44 +0000"
> 
> ```
> at 
> 
> ```
> 
> org.elasticsearch.common.joda.time.format.DateTimeFormatter.parseMillis(DateTimeFormatter.java:752)
> 
> ```
> at 
> 
> ```
> 
> org.elasticsearch.index.mapper.core.DateFieldMapper.parseStringValue(DateFieldMapper.java:459)
> 
> ```
> ... 19 more
> 
> ```
> 
> Thanks!.

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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: [October 17, 2013, 6:06pm UTC](https://discuss.elastic.co/t/elasticsearch-mapping-date-rfc-2822/13998/4 "2013-10-17T18:06:00Z")

</div>

Wondering now about Z.

Could you try with a date having GMT instead of +0000 ?

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

Le 17 oct. 2013 à 19:45, Federico García [fgredruello@icloud.com](mailto:fgredruello@icloud.com) a écrit :

Hi David:

Thanks for your quick response.

I've tried with EEE, fails with the following error.

org.elasticsearch.index.mapper.MapperParsingException: failed to parse [interaction.interaction.created\_at]  
at org.elasticsearch.index.mapper.core.AbstractFieldMapper.parse(AbstractFieldMapper.java:396)  
at org.elasticsearch.index.mapper.object.ObjectMapper.serializeValue(ObjectMapper.java:599)  
at org.elasticsearch.index.mapper.object.ObjectMapper.parse(ObjectMapper.java:467)  
at org.elasticsearch.index.mapper.object.ObjectMapper.serializeObject(ObjectMapper.java:515)  
at org.elasticsearch.index.mapper.object.ObjectMapper.parse(ObjectMapper.java:457)  
at org.elasticsearch.index.mapper.object.ObjectMapper.serializeObject(ObjectMapper.java:515)  
at org.elasticsearch.index.mapper.object.ObjectMapper.parse(ObjectMapper.java:457)  
at org.elasticsearch.index.mapper.DocumentMapper.parse(DocumentMapper.java:507)  
at org.elasticsearch.index.mapper.DocumentMapper.parse(DocumentMapper.java:451)  
at org.elasticsearch.index.shard.service.InternalIndexShard.prepareIndex(InternalIndexShard.java:329)  
at org.elasticsearch.action.bulk.TransportShardBulkAction.shardIndexOperation(TransportShardBulkAction.java:396)  
at org.elasticsearch.action.bulk.TransportShardBulkAction.shardOperationOnPrimary(TransportShardBulkAction.java:155)  
at org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction$AsyncShardOperationAction.performOnPrimary(TransportShardReplicationOperationAction.java:521)  
at org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction$AsyncShardOperationAction$1.run(TransportShardReplicationOperationAction.java:419)  
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)  
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)  
at java.lang.Thread.run(Thread.java:724)  
Caused by: org.elasticsearch.index.mapper.MapperParsingException: failed to parse date field [Thu, 17 Oct 2013 17:28:08 +0000], tried both date format [EEE, dd MMM yyyy HH:mm:ss Z], and timestamp number with locale [null]  
at org.elasticsearch.index.mapper.core.DateFieldMapper.parseStringValue(DateFieldMapper.java:465)  
at org.elasticsearch.index.mapper.core.DateFieldMapper.innerParseCreateField(DateFieldMapper.java:413)  
at org.elasticsearch.index.mapper.core.NumberFieldMapper.parseCreateField(NumberFieldMapper.java:167)  
at org.elasticsearch.index.mapper.core.AbstractFieldMapper.parse(AbstractFieldMapper.java:385)  
... 16 more  
Caused by: java.lang.IllegalArgumentException: Invalid format: "Thu, 17 Oct 2013 17:28:08 +0000"  
at org.elasticsearch.common.joda.time.format.DateTimeFormatter.parseMillis(DateTimeFormatter.java:752)  
at org.elasticsearch.index.mapper.core.DateFieldMapper.parseStringValue(DateFieldMapper.java:459)  
... 19 more

Thanks.  
Federico.

El jueves, 17 de octubre de 2013 19:12:37 UTC+2, Federico García escribió:

> Hi!  
> Original date RFC 2822: "Wed, 27 Mar 2013 15:12:14 +0000"  
> Mapping: "created\_at": {  
> "type": "date",  
> "format": "EEEE, dd MMM yyyy HH:mm:ss Z"  
> }
> 
> Elasticsearch index date as format string instead of date Elasticsearch produces an exception.
> 
> Caused by: org.elasticsearch.index.mapper.MapperParsingException: failed to parse date field [Thu, 17 Oct 2013 16:09:44 +0000], tried both date format [EEEE, dd MMM yyyy HH:mm:ss Z], and timestamp number with locale [null]  
> at org.elasticsearch.index.mapper.core.DateFieldMapper.parseStringValue(DateFieldMapper.java:465)  
> at org.elasticsearch.index.mapper.core.DateFieldMapper.innerParseCreateField(DateFieldMapper.java:413)  
> at org.elasticsearch.index.mapper.core.NumberFieldMapper.parseCreateField(NumberFieldMapper.java:167)  
> at org.elasticsearch.index.mapper.core.AbstractFieldMapper.parse(AbstractFieldMapper.java:385)  
> ... 16 more  
> Caused by: java.lang.IllegalArgumentException: Invalid format: "Thu, 17 Oct 2013 16:09:44 +0000"  
> at org.elasticsearch.common.joda.time.format.DateTimeFormatter.parseMillis(DateTimeFormatter.java:752)  
> at org.elasticsearch.index.mapper.core.DateFieldMapper.parseStringValue(DateFieldMapper.java:459)  
> ... 19 more
> 
> Thanks!.

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

### Author: ![Federico\_Garcia\_2](https://avatars.discourse-cdn.com/v4/letter/f/bc8723/32.png) [@Federico\_Garcia\_2](https://discuss.elastic.co/u/Federico_Garcia_2)
#### Post date: [October 17, 2013, 6:38pm UTC](https://discuss.elastic.co/t/elasticsearch-mapping-date-rfc-2822/13998/5 "2013-10-17T18:38:27Z")

</div>

SOLVED.

"type" : "date",  
"format" : "E, d MMM yyyy HH:mm:ss Z",  
"locale" : "US"

El jueves, 17 de octubre de 2013 19:12:37 UTC+2, Federico García escribió:

> Hi!
> 
> Original date RFC 2822: "Wed, 27 Mar 2013 15:12:14 +0000"
> 
> Mapping: "created\_at": {
> 
> ```
> "type": "date",
> 
> "format": "EEEE, dd MMM yyyy HH:mm:ss 
> 
> ```
> 
> Z"
> 
> }
> 
> Elasticsearch index date as format string instead of date Elasticsearch  
> produces an exception.
> 
> Caused by: org.elasticsearch.index.mapper.MapperParsingException: failed  
> to parse date field [Thu, 17 Oct 2013 16:09:44 +0000], tried both date  
> format [EEEE, dd MMM yyyy HH:mm:ss Z], and timestamp number with locale  
> [null]
> 
> ```
> at 
> 
> ```
> 
> org.elasticsearch.index.mapper.core.DateFieldMapper.parseStringValue(DateFieldMapper.java:465)
> 
> ```
> at 
> 
> ```
> 
> org.elasticsearch.index.mapper.core.DateFieldMapper.innerParseCreateField(DateFieldMapper.java:413)
> 
> ```
> at 
> 
> ```
> 
> org.elasticsearch.index.mapper.core.NumberFieldMapper.parseCreateField(NumberFieldMapper.java:167)
> 
> ```
> at 
> 
> ```
> 
> org.elasticsearch.index.mapper.core.AbstractFieldMapper.parse(AbstractFieldMapper.java:385)
> 
> ```
> ... 16 more
> 
> ```
> 
> Caused by: java.lang.IllegalArgumentException: Invalid format: "Thu, 17  
> Oct 2013 16:09:44 +0000"
> 
> ```
> at 
> 
> ```
> 
> org.elasticsearch.common.joda.time.format.DateTimeFormatter.parseMillis(DateTimeFormatter.java:752)
> 
> ```
> at 
> 
> ```
> 
> org.elasticsearch.index.mapper.core.DateFieldMapper.parseStringValue(DateFieldMapper.java:459)
> 
> ```
> ... 19 more
> 
> ```
> 
> Thanks!.

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

### Author: ![Federico\_Garcia\_2](https://avatars.discourse-cdn.com/v4/letter/f/bc8723/32.png) [@Federico\_Garcia\_2](https://discuss.elastic.co/u/Federico_Garcia_2)
#### Post date: [October 17, 2013, 6:43pm UTC](https://discuss.elastic.co/t/elasticsearch-mapping-date-rfc-2822/13998/6 "2013-10-17T18:43:01Z")

</div>

Thanks David.

Solved, add "locale" parameter to mapping.

"type" : "date",  
"format" : "E, d MMM yyyy HH:mm:ss Z",  
"locale" : "US"

El jueves, 17 de octubre de 2013 20:06:00 UTC+2, David Pilato escribió:

> Wondering now about Z.
> 
> Could you try with a date having GMT instead of +0000 ?
> 
> --  
> David 😉  
> Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> 
> Le 17 oct. 2013 à 19:45, Federico García \<[fgred...@icloud.com](mailto:fgred...@icloud.com)\<javascript:\>\>  
> a écrit :
> 
> Hi David:
> 
> Thanks for your quick response.
> 
> I've tried with EEE, fails with the following error.
> 
> org.elasticsearch.index.mapper.MapperParsingException: failed to parse  
> [interaction.interaction.created\_at]  
> at  
> org.elasticsearch.index.mapper.core.AbstractFieldMapper.parse(AbstractFieldMapper.java:396)  
> at  
> org.elasticsearch.index.mapper.object.ObjectMapper.serializeValue(ObjectMapper.java:599)  
> at  
> org.elasticsearch.index.mapper.object.ObjectMapper.parse(ObjectMapper.java:467)  
> at  
> org.elasticsearch.index.mapper.object.ObjectMapper.serializeObject(ObjectMapper.java:515)  
> at  
> org.elasticsearch.index.mapper.object.ObjectMapper.parse(ObjectMapper.java:457)  
> at  
> org.elasticsearch.index.mapper.object.ObjectMapper.serializeObject(ObjectMapper.java:515)  
> at  
> org.elasticsearch.index.mapper.object.ObjectMapper.parse(ObjectMapper.java:457)  
> at  
> org.elasticsearch.index.mapper.DocumentMapper.parse(DocumentMapper.java:507)  
> at  
> org.elasticsearch.index.mapper.DocumentMapper.parse(DocumentMapper.java:451)  
> at  
> org.elasticsearch.index.shard.service.InternalIndexShard.prepareIndex(InternalIndexShard.java:329)  
> at  
> org.elasticsearch.action.bulk.TransportShardBulkAction.shardIndexOperation(TransportShardBulkAction.java:396)  
> at  
> org.elasticsearch.action.bulk.TransportShardBulkAction.shardOperationOnPrimary(TransportShardBulkAction.java:155)  
> at  
> org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction$AsyncShardOperationAction.performOnPrimary(TransportShardReplicationOperationAction.java:521)  
> at  
> org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction$AsyncShardOperationAction$1.run(TransportShardReplicationOperationAction.java:419)  
> at  
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)  
> at  
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)  
> at java.lang.Thread.run(Thread.java:724)  
> Caused by: org.elasticsearch.index.mapper.MapperParsingException: failed  
> to parse date field [Thu, 17 Oct 2013 17:28:08 +0000], tried both date  
> format [EEE, dd MMM yyyy HH:mm:ss Z], and timestamp number with locale  
> [null]  
> at  
> org.elasticsearch.index.mapper.core.DateFieldMapper.parseStringValue(DateFieldMapper.java:465)  
> at  
> org.elasticsearch.index.mapper.core.DateFieldMapper.innerParseCreateField(DateFieldMapper.java:413)  
> at  
> org.elasticsearch.index.mapper.core.NumberFieldMapper.parseCreateField(NumberFieldMapper.java:167)  
> at  
> org.elasticsearch.index.mapper.core.AbstractFieldMapper.parse(AbstractFieldMapper.java:385)  
> ... 16 more  
> Caused by: java.lang.IllegalArgumentException: Invalid format: "Thu, 17  
> Oct 2013 17:28:08 +0000"  
> at  
> org.elasticsearch.common.joda.time.format.DateTimeFormatter.parseMillis(DateTimeFormatter.java:752)  
> at  
> org.elasticsearch.index.mapper.core.DateFieldMapper.parseStringValue(DateFieldMapper.java:459)  
> ... 19 more
> 
> Thanks.  
> Federico.
> 
> El jueves, 17 de octubre de 2013 19:12:37 UTC+2, Federico García escribió:
> 
> > Hi!
> > 
> > Original date RFC 2822: "Wed, 27 Mar 2013 15:12:14 +0000"
> > 
> > Mapping: "created\_at": {
> > 
> > ```
> > "type": "date",
> > 
> > "format": "EEEE, dd MMM yyyy HH:mm:ss 
> > 
> > ```
> > 
> > Z"
> > 
> > }
> > 
> > Elasticsearch index date as format string instead of date Elasticsearch  
> > produces an exception.
> > 
> > Caused by: org.elasticsearch.index.mapper.MapperParsingException: failed  
> > to parse date field [Thu, 17 Oct 2013 16:09:44 +0000], tried both date  
> > format [EEEE, dd MMM yyyy HH:mm:ss Z], and timestamp number with locale  
> > [null]
> > 
> > ```
> > at 
> > 
> > ```
> > 
> > org.elasticsearch.index.mapper.core.DateFieldMapper.parseStringValue(DateFieldMapper.java:465)
> > 
> > ```
> > at 
> > 
> > ```
> > 
> > org.elasticsearch.index.mapper.core.DateFieldMapper.innerParseCreateField(DateFieldMapper.java:413)
> > 
> > ```
> > at 
> > 
> > ```
> > 
> > org.elasticsearch.index.mapper.core.NumberFieldMapper.parseCreateField(NumberFieldMapper.java:167)
> > 
> > ```
> > at 
> > 
> > ```
> > 
> > org.elasticsearch.index.mapper.core.AbstractFieldMapper.parse(AbstractFieldMapper.java:385)
> > 
> > ```
> > ... 16 more
> > 
> > ```
> > 
> > Caused by: java.lang.IllegalArgumentException: Invalid format: "Thu, 17  
> > Oct 2013 16:09:44 +0000"
> > 
> > ```
> > at 
> > 
> > ```
> > 
> > org.elasticsearch.common.joda.time.format.DateTimeFormatter.parseMillis(DateTimeFormatter.java:752)
> > 
> > ```
> > at 
> > 
> > ```
> > 
> > org.elasticsearch.index.mapper.core.DateFieldMapper.parseStringValue(DateFieldMapper.java:459)
> > 
> > ```
> > ... 19 more
> > 
> > ```
> > 
> > Thanks!.
> 
> --  
> 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:\>.  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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, 2:11am UTC](https://discuss.elastic.co/t/elasticsearch-mapping-date-rfc-2822/13998/7 "2017-07-06T02:11:52Z")

</div>


