# Not able change type of a field string to date using index template

**URL:** <https://discuss.elastic.co/t/not-able-change-type-of-a-field-string-to-date-using-index-template/263995>\
**Category:** Elasticsearch\
**Created:** [February 11, 2021, 10:44am UTC](https://discuss.elastic.co/t/not-able-change-type-of-a-field-string-to-date-using-index-template/263995 "2021-02-11T10:44:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![amp](https://avatars.discourse-cdn.com/v4/letter/a/6a8cbe/32.png) [@amp](https://discuss.elastic.co/u/amp)\
**Post date:** [February 11, 2021, 10:44am UTC](https://discuss.elastic.co/t/not-able-change-type-of-a-field-string-to-date-using-index-template/263995/1 "2021-02-11T10:44:49Z")

</div>

In elasticsearch 6.3 indexing windows log using Nxlog(3.7).

Without any template all the fields indexed as strings. To get a date field we tried to change the Eventdate field as date. But getting parsing error.

the below config used for index template  
"EventTime": {  
"type": "date",  
"fields": {  
"keyword": {  
"type": "keyword",  
"ignore\_above": 256  
}  
}  
}

---

<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 11, 2021, 10:44am UTC](https://discuss.elastic.co/t/not-able-change-type-of-a-field-string-to-date-using-index-template/263995/2 "2021-03-11T10:44:57Z")

</div>

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