# Need help to convert into date from string

**URL:** <https://discuss.elastic.co/t/need-help-to-convert-into-date-from-string/115350>\
**Category:** Kibana\
**Created:** [January 12, 2018, 6:14pm UTC](https://discuss.elastic.co/t/need-help-to-convert-into-date-from-string/115350 "2018-01-12T18:14:55Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![pingmehere](https://avatars.discourse-cdn.com/v4/letter/p/47e85d/32.png) [@pingmehere](https://discuss.elastic.co/u/pingmehere)\
**Post date:** [January 12, 2018, 6:14pm UTC](https://discuss.elastic.co/t/need-help-to-convert-into-date-from-string/115350/1 "2018-01-12T18:14:55Z")

</div>

Hi there,  
I'm importing sql data into ES through some 3rd party software. While importing data from database to ES, it taking as string but I want this data as date datatype. May I know how to convert in Kibana uploaded data.

Thanks  
Manu

---

<div class="post-metadata">

**Author:** ![Brandon\_Kobel](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/brandon_kobel/32/14829_2.png) [@Brandon\_Kobel](https://discuss.elastic.co/u/Brandon_Kobel)\
**Post date:** [January 12, 2018, 8:00pm UTC](https://discuss.elastic.co/t/need-help-to-convert-into-date-from-string/115350/2 "2018-01-12T20:00:56Z")

</div>

Hey @pingmehere you could use Kibana's [Scripted Fields](https://www.elastic.co/guide/en/kibana/current/scripted-fields.html) to convert the strings into dates, but it'll be much less performant than doing so on ingest.

---

<div class="post-metadata">

**Author:** ![pingmehere](https://avatars.discourse-cdn.com/v4/letter/p/47e85d/32.png) [@pingmehere](https://discuss.elastic.co/u/pingmehere)\
**Post date:** [January 12, 2018, 8:12pm UTC](https://discuss.elastic.co/t/need-help-to-convert-into-date-from-string/115350/3 "2018-01-12T20:12:53Z")

</div>

> [@Brandon\_Kobel](#):
>
> on

Thanks.  
Is there any other way to convert with high and good performance.

Manu

---

<div class="post-metadata">

**Author:** ![Brandon\_Kobel](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/brandon_kobel/32/14829_2.png) [@Brandon\_Kobel](https://discuss.elastic.co/u/Brandon_Kobel)\
**Post date:** [January 12, 2018, 8:33pm UTC](https://discuss.elastic.co/t/need-help-to-convert-into-date-from-string/115350/4 "2018-01-12T20:33:30Z")

</div>

@pingmehere you could use the [Reindex API](https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-reindex.html) in Elasticsearch to execute a script that converts to the Date field.

---

<div class="post-metadata">

**Author:** ![pingmehere](https://avatars.discourse-cdn.com/v4/letter/p/47e85d/32.png) [@pingmehere](https://discuss.elastic.co/u/pingmehere)\
**Post date:** [January 12, 2018, 9:30pm UTC](https://discuss.elastic.co/t/need-help-to-convert-into-date-from-string/115350/5 "2018-01-12T21:30:15Z")

</div>

Thanks, I'll try with that.

---

<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:** [February 9, 2018, 9:30pm UTC](https://discuss.elastic.co/t/need-help-to-convert-into-date-from-string/115350/6 "2018-02-09T21:30:28Z")

</div>

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