On Text and Number fields, there is an option for a "Format". This text box accepts a very specific kind of string made up of the characters below to format your number how you wish. By default, the Format string applied to all numbers, but if you want a different format for positive and negative numbers, you may do so by separating them by semicolons (;). The format for that is then "positive; negative; zero".

The characters expected inside a format string are as follows:

Character Description
# Placeholder that displays the digit from the value if it’s present.
0 Placeholder that displays the digit from the value if it’s present. If no digit is present, 0 (zero) is displayed in its place.
. Placeholder for the position of the decimal character.
, Placeholder that indicates that the number should be formatted with thousands separators.
% Displays the number multiplied by 100.
( Displays an open parenthesis.
) Displays a closing parenthesis.
+ Displays a plus sign to the left of the number if the number is positive or a minus sign if the number is negative.
- Displays a minus sign to the left of the number if the number is negative. There is no effect for positive numbers.
E or e Displays the number in scientific notation.
\\ Displays the character that follows the backslash.

There are a few Examples to make this more clear:

Input Format Output
1.982 #.## 1.98
1.3 #.0000 1.3000
5 0000 0005
.57 #% 25%
4.2 #.##; (#.##); \z\e\r\o 4.2
-4.2 #.##; (#.##); \z\e\r\o (4.2)
0 #.##; (#.##); \z\e\r\o zero

Documentation partially from http://developer.xojo.com/userguide/formatting-values