Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 457
  • Last Modified:

VB.NET number formating

How to express the following statement in VB.NET ?

Text1.Text = format(123456789.12345,"#,###.####")

Thanks

0
vbhaha
Asked:
vbhaha
  • 5
  • 2
1 Solution
 
ajaikumarrCommented:
Hai,

Try it like this.
MyStr = Format(5459.4, "##,##0.00")   ' Returns "5,459.40".
MyStr = Format(334.9, "###0.00")   ' Returns "334.90".
MyStr = Format(5, "0.00%")   ' Returns "500.00%".

Bye
Ajai
0
 
ajaikumarrCommented:
Hai,

Here it's
Text1.Text =  Format(123456789.12345, "#,##0.0000")

Bye
Ajai
0
 
vbhahaAuthor Commented:
Sorray I made a mistake, it should be:

Text1.Text = format("123456789.12345","#,###.####")
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
ajaikumarrCommented:
Hai,

Here it's
Textbox1.Text = Format(cint("123456789.12345", "#,##0.0000")

Bye
Ajai
0
 
ajaikumarrCommented:
Hai,

Sorry,

TextBox1.Text = Format(CDbl("123456789.12345"), "#,##0.0000")

Bye
Ajai
0
 
vbhahaAuthor Commented:
Thanks Ajai!
0
 
ajaikumarrCommented:
Hai,

Most welcome.

Bye
Ajai
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 5
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now