# format on label component

**URL:** <https://forum.servoy.com/t/format-on-label-component/19774>\
**Category:** Classic Servoy\
**Created:** [August 29, 2018, 6:59am UTC](https://forum.servoy.com/t/format-on-label-component/19774 "2018-08-29T06:59:48Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![andre1506345542](https://avatars.discourse-cdn.com/v4/letter/a/7c8e57/32.png) [@andre1506345542](https://forum.servoy.com/u/andre1506345542)\
**Post date:** [August 29, 2018, 6:59am UTC](https://forum.servoy.com/t/format-on-label-component/19774/1 "2018-08-29T06:59:48Z")

</div>

Hi

I have a calculated field, which I want to show on a label in a table view.  
The calculated field returns a number variable. But it is always an integer.  
The label now displays the number with one decimal. eg. 1.0 5.0 or 11.0 etc instead of 1 5 or 11

I have tried to change the format property of the label, but with out success.

How can I show the number as an integer.

Temp fix: Now, I return a string from the calculated field. But that is not really the way to go.

Thanks  
Andre

---

<div class="post-metadata">

**Author:** ![sdevlin](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/sdevlin/32/4488_2.png) [@sdevlin](https://forum.servoy.com/u/sdevlin)\
**Post date:** [August 29, 2018, 3:03pm UTC](https://forum.servoy.com/t/format-on-label-component/19774/2 "2018-08-29T15:03:57Z")

</div>

Hi Andre,  
I cannot reproduce this issue. The default format of the label should be what you see.

What version of Servoy?  
And what client type please? (i.e. NGClient, Smart Client, etc)  
What is the declared datatype of your calculation?  
What format strings have you tried?

You could check your default number format on the servoy admin page. Perhaps it is #.0  
But this would be overridden by the element format. So it’s not clear to me why this happens.

---

<div class="post-metadata">

**Author:** ![andre1506345542](https://avatars.discourse-cdn.com/v4/letter/a/7c8e57/32.png) [@andre1506345542](https://forum.servoy.com/u/andre1506345542)\
**Post date:** [August 30, 2018, 6:48am UTC](https://forum.servoy.com/t/format-on-label-component/19774/3 "2018-08-30T06:48:56Z")

</div>

Hi Sean  
I use 8.3.1 NG Client.  
Declared value is a Number. As so far I know there is no integer.  
The label is a normal servoy label on a table view. The calculated field returns a Number.

I have tried

#### 

####.  
###0

On admin page the locale.numberformat and locale.integerformat are empty.

Thanks

---

<div class="post-metadata">

**Author:** ![andre1506345542](https://avatars.discourse-cdn.com/v4/letter/a/7c8e57/32.png) [@andre1506345542](https://forum.servoy.com/u/andre1506345542)\
**Post date:** [August 30, 2018, 6:52am UTC](https://forum.servoy.com/t/format-on-label-component/19774/4 "2018-08-30T06:52:08Z")

</div>

BTW Sean,  
I tried to make a test solution but there it works fine. But I did not create a calculated but just a regular function.  
We use i18n.setLocale, can this cause something.

Brdgs  
Andre
