Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Formatting Decimals Numbers

Status
Not open for further replies.

allanmc10

Programmer
Feb 23, 2006
39
0
0
GB
hi all

i have created an invoice, but i would like to format totals to 2 decimal places. Is their a function that can do this or how would i fomat decimals???

rgrds

allan
 
Are you just asking about using predefined formats in the .ToString method?

mynumber.Tostring("f2")

or c2, or n2 (or look it up in the documentation) if you ommit precision (for instance f, c, n) , it will look up the NumberFormatInfo.

Roy-Vidar
 
Cheers royvidar

but didn't no their was a fomat function but do know, used this to format totals


cheers

allan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top