# Data Types in knime

**URL:** <https://forum.knime.com/t/data-types-in-knime/8755>\
**Category:** KNIME Analytics Platform\
**Created:** [May 31, 2017, 11:05am UTC](https://forum.knime.com/t/data-types-in-knime/8755 "2017-05-31T11:05:13Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![nikhil.mane007](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/n/94ad74/32.png) [@nikhil.mane007](https://forum.knime.com/u/nikhil.mane007)\
**Post date:** [May 31, 2017, 11:05am UTC](https://forum.knime.com/t/data-types-in-knime/8755/1 "2017-05-31T11:05:13Z")

</div>

Hi,

One of my column has following value 3.689348814744643E19

colun is double and it fails when I&nbsp;try to "Database Write" to MySql

I coverted it from double to long by java snippet &nbsp;as followed and it worked-

-----------------------------

long x;

x=$GTP.DlActvSmplsNbr$.longValue();

return x;

--------------------------------

&nbsp;

I am wondering whats the difference between these two dataypes in 'KNIME'.

Also I have 100+ columns which are in double. with such a large value. How can I convert this to long.

I can't use file reader node for this.

&nbsp;

---

<div class="post-metadata">

**Author:** ![nikhil.mane007](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/n/94ad74/32.png) [@nikhil.mane007](https://forum.knime.com/u/nikhil.mane007)\
**Post date:** [June 1, 2017, 10:47am UTC](https://forum.knime.com/t/data-types-in-knime/8755/2 "2017-06-01T10:47:42Z")

</div>

I figured out seconds part -

**double** \>\>numer to string \> **String** \>\> String to number \>\> **Long.**

But still wondering about data types in knime and thier relation(mappng) with Mysql datatypes via DB writer.

Any suggestions?

&nbsp;

&nbsp;

---

<div class="post-metadata">

**Author:** ![thor](https://forum-cdn.knime.com/user_avatar/forum.knime.com/thor/32/4_2.png) [@thor](https://forum.knime.com/u/thor)\
**Post date:** [June 1, 2017, 12:17pm UTC](https://forum.knime.com/t/data-types-in-knime/8755/3 "2017-06-01T12:17:01Z")

</div>

You can see the (default) mapping in the second tab of the _Database Writer_. There you can also change the mapping.

Note that by converting double values to long you will loose information (basically the fractional part). If you are fine with this you can use the _Double to Int_ node (which can also create long cells despite its name).

---

<div class="post-metadata">

**Author:** ![system](https://forum-cdn.knime.com/uploads/default/original/1X/ab3ccf34482a0329361734a18199390177204f15.png) [@system](https://forum.knime.com/u/system)\
**Post date:** [June 23, 2023, 8:26pm UTC](https://forum.knime.com/t/data-types-in-knime/8755/4 "2023-06-23T20:26:36Z")

</div>


