# Problem date error 0000-00-00

**URL:** <https://discuss.elastic.co/t/problem-date-error-0000-00-00/18333>\
**Category:** Elasticsearch\
**Created:** [June 25, 2014, 2:41pm UTC](https://discuss.elastic.co/t/problem-date-error-0000-00-00/18333 "2014-06-25T14:41:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tanguy\_Bernard](https://avatars.discourse-cdn.com/v4/letter/t/839c29/32.png) [@Tanguy\_Bernard](https://discuss.elastic.co/u/Tanguy_Bernard)\
**Post date:** [June 25, 2014, 2:41pm UTC](https://discuss.elastic.co/t/problem-date-error-0000-00-00/18333/1 "2014-06-25T14:41:00Z")

</div>

Hello,

I have a problem with date format, when I'm indexing my SQL table, I have  
this :  
0000-00-00' can not be represented as java.sql.Date

I have tried this for my mapping :

my date = array(  
'type' =\> 'date',  
"format"=\>"date",  
'null\_value'=\>'0000-00-00',  
);

but this did not work !

Can you help me to find an answer ?

Thank you in advance.

Tanguy

--  
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/b520d277-72f5-4291-ba8c-938cae48e327%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/b520d277-72f5-4291-ba8c-938cae48e327%40googlegroups.com).  
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, 1:19am UTC](https://discuss.elastic.co/t/problem-date-error-0000-00-00/18333/2 "2017-07-06T01:19:50Z")

</div>


