469,592 Members | 1,729 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,592 developers. It's quick & easy.

Formatting number with two decimal places

Hello

I need to have a value display in a label with two decimal places; e.g. "4" to display as "4.00

Any help will be appreciated

Sandy
Nov 20 '05 #1
3 27788
"Sandy" <an*******@discussions.microsoft.com> schrieb

I need to have a value display in a label with two decimal places;
e.g. "4" to display as "4.00"


dim d as decimal
dim s as string

d = 4
s = d.tostring("0.00")

I assume you store numeric values in numeric variables.

--
Armin

How to quote and why:
http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html


Nov 20 '05 #2
Hi Armin

Thanks so much for your response

I'll try this tomorrow

Sand

----- Armin Zingler wrote: ----

"Sandy" <an*******@discussions.microsoft.com> schrie
I need to have a value display in a label with two decimal places

e.g. "4" to display as "4.00"


dim d as decima
dim s as strin

d =
s = d.tostring("0.00"

I assume you store numeric values in numeric variables

--
Armi

How to quote and why
http://www.plig.net/nnq/nquote.htm
http://www.netmeister.org/news/learn2quote.htm

Nov 20 '05 #3
Thanks, Armin - it worked great!
Nov 20 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by ian | last post: by
36 posts views Thread by Andrew | last post: by
7 posts views Thread by Chris | last post: by
14 posts views Thread by Scott M. | last post: by
3 posts views Thread by Nathan Sokalski | last post: by
9 posts views Thread by john coltrane | last post: by
4 posts views Thread by guiromero | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.