Formatting Currency field

Questions and answers on designing your Servoy solutions, database modelling and other 'how do I do this' that don't fit in any of the other categories

Formatting Currency field

Postby Infop » Fri Dec 14, 2007 8:54 am

Hi,

How can I format one Currency field.

That mean, I want to display...

$2.00
$56.00
$25,456.00
$36,537,839,289.00

Then, what will be the format property for that field?
User avatar
Infop
 
Posts: 151
Joined: Fri Nov 30, 2007 3:00 pm

Postby rodneysieb » Fri Dec 14, 2007 10:39 am

Hi

Format this as $#,##0.00

works for me.
Regards,
Rodney Siebenhausen

logic@work
Brisbane, Australia
rodneysieb
 
Posts: 260
Joined: Tue Feb 14, 2006 9:11 am
Location: Brisbane, Australia

Postby Infop » Fri Dec 14, 2007 11:02 am

rodneysieb wrote:Format this as $#,##0.00


Hi Rodney,

Then, you can only enter

$6,780.00
$7,890.00
$9,080.00

That mean, the length will be a fixed one.
I need It can take the following numbers as well...

$2.00
$56.45
$25,456.00
$36,537,839,289.35

Is it possible?
User avatar
Infop
 
Posts: 151
Joined: Fri Nov 30, 2007 3:00 pm

Postby Joas » Fri Dec 14, 2007 11:41 am

Have you tried the format that Rodney suggested? Because that is the way to do it.

Further, if you want your users to enter the data with a different mask (for example to not have them type the dollar-sign and the thousand separators), you can specify that mask after a pipe like this: $#,##0.00|#.##
Joas de Haan
Yield Software Development
Need help on your project? yieldsd.com
User avatar
Joas
Site Admin
 
Posts: 842
Joined: Mon Mar 20, 2006 4:07 pm
Location: Leusden, NL


Return to Programming with Servoy

Who is online

Users browsing this forum: No registered users and 19 guests