# Data Type conversion

**URL:** <https://discuss.elastic.co/t/data-type-conversion/196349>\
**Category:** Logstash\
**Created:** [August 22, 2019, 2:39pm UTC](https://discuss.elastic.co/t/data-type-conversion/196349 "2019-08-22T14:39:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rohitg](https://avatars.discourse-cdn.com/v4/letter/r/b77776/32.png) [@rohitg](https://discuss.elastic.co/u/rohitg)\
**Post date:** [August 22, 2019, 2:39pm UTC](https://discuss.elastic.co/t/data-type-conversion/196349/1 "2019-08-22T14:39:11Z")

</div>

How to convert?

1. Latitude and longitude from string type to float type
2. Date from String type to Date type or DateTime type

Thanks.

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [August 22, 2019, 6:10pm UTC](https://discuss.elastic.co/t/data-type-conversion/196349/2 "2019-08-22T18:10:23Z")

</div>

1. If the field is defined as a geo\_point in elasticsearch you do not need to do the conversion, elasticsearch will do it for you. If you still want to do the conversion use the convert option on a mutate filter

2. Use a date filter

---

<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:** [September 19, 2019, 6:10pm UTC](https://discuss.elastic.co/t/data-type-conversion/196349/3 "2019-09-19T18:10:26Z")

</div>

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