# Number Format

**URL:** <https://forum.servoy.com/t/number-format/12548>\
**Category:** Classic Servoy\
**Created:** [July 29, 2010, 1:04pm UTC](https://forum.servoy.com/t/number-format/12548 "2010-07-29T13:04:58Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![stefbrt](https://avatars.discourse-cdn.com/v4/letter/s/858c86/32.png) [@stefbrt](https://forum.servoy.com/u/stefbrt)\
**Post date:** [July 29, 2010, 1:04pm UTC](https://forum.servoy.com/t/number-format/12548/1 "2010-07-29T13:04:58Z")

</div>

Hello

I want to format a social number like 756.6523.5720.40

I tried to set the format propertie of the field to ####,####,####,## and to 000,0000,0000,00 but both does not work as expected!

How can I format a number like shown above.

Regards

Stef

---

<div class="post-metadata">

**Author:** ![tgs](https://avatars.discourse-cdn.com/v4/letter/t/f19dbf/32.png) [@tgs](https://forum.servoy.com/u/tgs)\
**Post date:** [July 29, 2010, 1:41pm UTC](https://forum.servoy.com/t/number-format/12548/2 "2010-07-29T13:41:05Z")

</div>

What type of field do you have? Integer or number?  
I tried to format both by setting the property like your example, but it also doesn’t work for me. Is it possible for you to take a text field and format the value by an onDataChange function?

Regards  
Thomas

---

<div class="post-metadata">

**Author:** ![jcompagner](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/jcompagner/32/4889_2.png) [@jcompagner](https://forum.servoy.com/u/jcompagner)\
**Post date:** [July 29, 2010, 3:49pm UTC](https://forum.servoy.com/t/number-format/12548/3 "2010-07-29T15:49:45Z")

</div>

my guess is that you need to use a mask so that ####,####,####,#### and so on the , is really not seen as a decimal or grouping symbol but more as a literal (which it kind of is)

---

<div class="post-metadata">

**Author:** ![stefbrt](https://avatars.discourse-cdn.com/v4/letter/s/858c86/32.png) [@stefbrt](https://forum.servoy.com/u/stefbrt)\
**Post date:** [August 18, 2010, 9:49am UTC](https://forum.servoy.com/t/number-format/12548/4 "2010-08-18T09:49:31Z")

</div>

Sorry for my late reply. I was in holidays.

The Format ####,####,####,#### is not what i want! It looks like it is not possible to format the number automaticly like 756.6523.5720.40

I think i have to format the number manually onDataChange.

Regrads  
Stefan

---

<div class="post-metadata">

**Author:** ![jcompagner](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/jcompagner/32/4889_2.png) [@jcompagner](https://forum.servoy.com/u/jcompagner)\
**Post date:** [August 18, 2010, 10:00am UTC](https://forum.servoy.com/t/number-format/12548/5 "2010-08-18T10:00:08Z")

</div>

If you store it as a string, then this mask:

###.####.####.##

should work fine (it is really not a number anyway…)

You can’t use that on real numbers at the moment, or you have to place a converter between it…  
That converts from a number DB value to a String (and then use the above mask)  
and converts from the String to the number db value again (but this is already pretty automatic)
