Format Command

splatt

Active Member
Licensed User
Longtime User
Is there an equivalent to the format command from Basic4ppc?

I want to ensure that numbers between 0 - 9 always display a leading zero.
 

Ricky D

Well-Known Member
Licensed User
Longtime User
number formatting

Hi.

I have tried this numberformat but it doesn't work like I need.

if I do NumberFormat(anumber,0,2) where anumber=0 the display is 0

I want to see it as 0.00
or 5.6 to show 5.60

How do we do that?

regards, Ricky
 
Upvote 0

Ricky D

Well-Known Member
Licensed User
Longtime User
found out how to do it

this bit of code does it:

B4X:
tAmount.Text = NumberFormat2(c.TollWhere.Amount,1,2,2,False)

regards, Ricky
 
Upvote 0
Top