# Index date starting with "Day of Week"

**URL:** https://discuss.elastic.co/t/index-date-starting-with-day-of-week/217874
**Category:** Elasticsearch
**Created:** [February 4, 2020, 8:58pm UTC](https://discuss.elastic.co/t/index-date-starting-with-day-of-week/217874 "2020-02-04T20:58:49Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![theonlyalterego](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/theonlyalterego/32/62069_2.png) [@theonlyalterego](https://discuss.elastic.co/u/theonlyalterego)
#### Post date: [February 4, 2020, 8:58pm UTC](https://discuss.elastic.co/t/index-date-starting-with-day-of-week/217874/1 "2020-02-04T20:58:49Z")

</div>

Elastic Error:  
Caused by: java.lang.IllegalArgumentException: failed to parse date field [Tue Feb 06 2029 00:00:00 GMT-0500 (Eastern Standard Time)] with format [yyyy-MM-dd'T'HH:mm:ss.SSSZ||yyyy-MM-dd'T'HH:mm:ss.SSS'Z'||yyyy/MM/dd HH:mm:ss||yyyy/MM/dd||epoch\_millis]

Date input: Tue Feb 06 2029 00:00:00 GMT-0500 (Eastern Standard Time)

Is there a way I can match that format for a date in ES? I don't see any options in the format documentation for "day of week"

This is coming from a javascript date.toString() that I'd prefer not to have to change.

---

<div class="post-metadata">

### Author: ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)
#### Post date: [February 5, 2020, 9:45am UTC](https://discuss.elastic.co/t/index-date-starting-with-day-of-week/217874/2 "2020-02-05T09:45:13Z")

</div>

Hey,

this would be a start to play around `EEE MMM dd yyyy HH:mm:ss ZZZ` - I am not sure if you can parse `GMT-0500` and you also could try to play around with `z` as a pattern for `(Eastern Standard Time)`.

You can play around at [https://esddd.herokuapp.com/](https://esddd.herokuapp.com/) with different date formats and see how those are parsed...

--Alex

---

<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: [March 4, 2020, 9:45am UTC](https://discuss.elastic.co/t/index-date-starting-with-day-of-week/217874/3 "2020-03-04T09:45:17Z")

</div>

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