# Logstash error: cannot parse empty date

**URL:** <https://discuss.elastic.co/t/logstash-error-cannot-parse-empty-date/247983>\
**Category:** Logstash\
**Created:** [September 9, 2020, 9:21am UTC](https://discuss.elastic.co/t/logstash-error-cannot-parse-empty-date/247983 "2020-09-09T09:21:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![hiba](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hiba/32/110919_2.png) [@hiba](https://discuss.elastic.co/u/hiba)\
**Post date:** [September 9, 2020, 9:21am UTC](https://discuss.elastic.co/t/logstash-error-cannot-parse-empty-date/247983/1 "2020-09-09T09:21:33Z")

</div>

Hi all,

i want to load data from an api to elasticserach via logstash.  
i have a field "depDate" with date type ....in some documents, this field can be empty .  
what can i do to load this documents in my index ?  
[2020-09-09T09:49:57,579][WARN][logstash.outputs.elasticsearch][main][fed23d7d9bfa7507f60b2d65f38c4267d771d4cffdd05c45a32b8c5349f75058  
] Could not index event to Elasticsearch.  
{:status=\>400, :action=\>["update", {:\_id=\>"553512", :\_index=\>"book\_v1", :routing=\>nil, :\_type=\>"\_doc", :retry\_on\_conflict=\>1}, #LogStash::Event:0x64601638],  
:response=\>{"update"=\>{"\_index"=\>"book\_v1", "\_type"=\>"\_doc", "\_id"=\>"553512", "status"=\>400, "error"=\>{"type"=\>"mapper\_parsing\_exception",  
"reason"=\>"failed to parse field [depDate] of type [date] in document with id '553512'. Preview of field's value: ''",  
"caused\_by"=\>{"type"=\>"illegal\_argument\_exception", "reason"=\>"cannot parse empty date"}}}}}

any help please!  
Hiba

---

<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:** [October 7, 2020, 9:21am UTC](https://discuss.elastic.co/t/logstash-error-cannot-parse-empty-date/247983/2 "2020-10-07T09:21:42Z")

</div>

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