Format command
Use the Format or Mask command to
format numbers, dates and times. Both commands are identical.
Syntax:
Format=[format]
Mask=[format]
Example:
{Format=###,##0} 1234 {Format=;\n}
Will be shown: 1,234
{format=currency} 1234 {Format=;\n}
Will be shown: $ 1,234.00
To close the format it will be necessary to
close it with this command: {Format=}
More examples:
Expression |
Format |
Result |
1234 |
currency |
$ 1,234.00 |
12 |
#,##0.00 |
12.00 |
12 |
0000.00 |
0012.00 |
7890 |
#, K |
7 K |
7890123 |
#, K |
7890 K |
7890123 |
#,, M |
8 M |
01/01/2005 |
dd/MM/yyyy |
01/01/2005 |
05/01/2005 |
dd/MMM/yyyy |
01/May/2005 |
01/05/2005 |
dd/MMMM/yyyy |
05/January/2005 |
2/19 |
MMMM |
February |
Depending on the regional settings on your
computer, the format may vary. In some countries for example, thousand separator is
period instead comma. However, the format must be always speficied with comma as
thousand separator. Windows, according the regional settings of the system will
show the appropiate format. The same will occur with the currency and date formats.
|