# IgnoreMalFormed

**URL:** <https://discuss.elastic.co/t/ignoremalformed/110327>\
**Category:** Elasticsearch\
**Created:** [December 5, 2017, 11:37am UTC](https://discuss.elastic.co/t/ignoremalformed/110327 "2017-12-05T11:37:58Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![nkdev89](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nkdev89/32/23593_2.png) [@nkdev89](https://discuss.elastic.co/u/nkdev89)\
**Post date:** [December 5, 2017, 11:37am UTC](https://discuss.elastic.co/t/ignoremalformed/110327/1 "2017-12-05T11:37:58Z")

</div>

Hi ,

I have a C# DateTime Field as below

```
    [Date(Format = "yyyy-MM-ddThh:mm:ss",IgnoreMalformed =true)]
    public DateTime BirthdateTime { get; set; }

```

I'm getting below error , even after setting IgnoreMalformed =true, Is there anything I'm missing ?

Invalid format: "2017-12-05T17:04:01.4501539+05:30" is malformed at ".4501539+05:30"

---

<div class="post-metadata">

**Author:** ![JKhondhu](https://avatars.discourse-cdn.com/v4/letter/j/ed655f/32.png) [@JKhondhu](https://discuss.elastic.co/u/JKhondhu)\
**Post date:** [December 5, 2017, 12:17pm UTC](https://discuss.elastic.co/t/ignoremalformed/110327/2 "2017-12-05T12:17:35Z")

</div>

Hi,

Is the index already created?  
Can you share the index mapping? GET index\_name/\_mapping

---

<div class="post-metadata">

**Author:** ![nkdev89](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nkdev89/32/23593_2.png) [@nkdev89](https://discuss.elastic.co/u/nkdev89)\
**Post date:** [December 5, 2017, 1:07pm UTC](https://discuss.elastic.co/t/ignoremalformed/110327/3 "2017-12-05T13:07:58Z")

</div>

Here is the mapping .

"CountryList" : {  
"mappings" : {  
"EsCountry" : {  
"dynamic" : "strict",  
"\_meta" : {  
"Comment" : "Test",  
"Modified" : "2016-09-20T11:00:00",  
"Created" : "2016-09-20T11:00:00"  
},  
"\_all" : {  
"enabled" : false  
},  
"properties" : {  
"Created" : {  
"type" : "date",  
"index" : false,  
"format" : "strict\_date\_hour\_minute\_second"  
},  
"Modified" : {  
"type" : "date",  
"index" : false,  
"format" : "strict\_date\_hour\_minute\_second"  
},  
"Name" : {  
"type" : "keyword"  
}  
}  
}  
}  
}  
}

---

<div class="post-metadata">

**Author:** ![nkdev89](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nkdev89/32/23593_2.png) [@nkdev89](https://discuss.elastic.co/u/nkdev89)\
**Post date:** [December 7, 2017, 3:33am UTC](https://discuss.elastic.co/t/ignoremalformed/110327/4 "2017-12-07T03:33:30Z")

</div>

This link helped to solve my issue .

> [@Inserting Datetime field using ES Nest](https://discuss.elastic.co/t/inserting-datetime-field-using-es-nest/51899):
>
> I'm trying to add a field which takes the system's datetime (DateTime.Now) and index it on ES server. When I insert it without any custom format, I can index the documents. But if I mention any format, it is throwing an error. can some one help me to correct ? my mappings: var createIndexResponse = client.CreateIndex(defaultIndex, c =\> c .Mappings(m =\> m .Map\<Document\>(mp =\> mp .Proper…

---

<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:** [January 4, 2018, 3:34am UTC](https://discuss.elastic.co/t/ignoremalformed/110327/5 "2018-01-04T03:34:17Z")

</div>

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