# Convert DATA to number

**URL:** <https://discuss.elastic.co/t/convert-data-to-number/159601>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [December 5, 2018, 8:42pm UTC](https://discuss.elastic.co/t/convert-data-to-number/159601 "2018-12-05T20:42:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ritten](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ritten/32/38483_2.png) [@Ritten](https://discuss.elastic.co/u/Ritten)\
**Post date:** [December 5, 2018, 8:42pm UTC](https://discuss.elastic.co/t/convert-data-to-number/159601/1 "2018-12-05T20:42:46Z")

</div>

Hi. I have a long string divided with semicolon that I successfully have divided into several DATA fields, but I can't solve this problem.  
One of the DATA fields contains this 812.50.00. I need to get that DATA converted into a number, but don't know how. I have tried to use convert, but I think one of the problems is that it contains two dots.

Anyone who can help?

---

<div class="post-metadata">

**Author:** ![steffens](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/steffens/32/79630_2.png) [@steffens](https://discuss.elastic.co/u/steffens)\
**Post date:** [December 6, 2018, 1:07pm UTC](https://discuss.elastic.co/t/convert-data-to-number/159601/2 "2018-12-06T13:07:11Z")

</div>

What did you use to divide the string? In LS or Ingest node you could do some processing to remove the dots and then convert to a number.

---

<div class="post-metadata">

**Author:** ![Ritten](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ritten/32/38483_2.png) [@Ritten](https://discuss.elastic.co/u/Ritten)\
**Post date:** [December 7, 2018, 9:59am UTC](https://discuss.elastic.co/t/convert-data-to-number/159601/3 "2018-12-07T09:59:29Z")

</div>

Hi Steffens  
I used filebeat to get the data from the CSV file to elastic.  
I have now solved the problem this way, but any idea to do it better will be appreciated.  
In the pipeline in elastic I have now done so that if the import of data fails, it will set the field value to a fixed number. It works, but the numbers will not be totally correct.

---

<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, 2019, 10:09am UTC](https://discuss.elastic.co/t/convert-data-to-number/159601/4 "2019-01-04T10:09:04Z")

</div>

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