By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,609 Members | 3,766 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,609 IT Pros & Developers. It's quick & easy.

Formatting number with two decimal places

P: n/a
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
Share this Question
Share on Google+
3 Replies


P: n/a
"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

P: n/a
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

P: n/a
Thanks, Armin - it worked great!
Nov 20 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.