# Phone formatting

**URL:** <https://forum.servoy.com/t/phone-formatting/21202>\
**Category:** Questions\
**Created:** [March 28, 2024, 1:16pm UTC](https://forum.servoy.com/t/phone-formatting/21202 "2024-03-28T13:16:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![alasdairs](https://avatars.discourse-cdn.com/v4/letter/a/839c29/32.png) [@alasdairs](https://forum.servoy.com/u/alasdairs)\
**Post date:** [March 28, 2024, 1:16pm UTC](https://forum.servoy.com/t/phone-formatting/21202/1 "2024-03-28T13:16:16Z")

</div>

Hi all,

I was wondering how I could get a number in a text field from the database to be formatted as the full string. I have some phone numbers in the database at the moment but they are all being shown as #.#########E9. I need them to just be the string sent from the database just in case a number has a bracket, plus, space, or 0 at the beginning.

Thanks,  
Alasdair

---

<div class="post-metadata">

**Author:** ![mboegem](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/mboegem/32/4399_2.png) [@mboegem](https://forum.servoy.com/u/mboegem)\
**Post date:** [March 28, 2024, 2:49pm UTC](https://forum.servoy.com/t/phone-formatting/21202/2 "2024-03-28T14:49:45Z")

</div>

Seems to me that the field is currently a number/integer, which means it can not have a bracket/plus/space in the database.

In order to display numbers as text you can create a calculation in Servoy and use:

```auto
utils.numberFormat(myField, '#')

```

You can then format the string with whatever rule you like.

---

<div class="post-metadata">

**Author:** ![alasdairs](https://avatars.discourse-cdn.com/v4/letter/a/839c29/32.png) [@alasdairs](https://forum.servoy.com/u/alasdairs)\
**Post date:** [March 28, 2024, 4:41pm UTC](https://forum.servoy.com/t/phone-formatting/21202/3 "2024-03-28T16:41:10Z")

</div>

Thanks marc, that works perfectly!
